未验证 提交 8dad158a 编写于 作者: L LBJ-the-GOAT 提交者: GitHub

fix: resolve LGTM alerts (PR #1162)

* fix LGTM alerts
* Update jadx-gui/src/main/java/jadx/gui/device/debugger/BreakpointManager.java
* Update Smali.java

Co-authored-by: tobias <tobias.hotmail.com>
Co-authored-by: Nskylot <118523+skylot@users.noreply.github.com>
上级 bfc343d1
...@@ -166,7 +166,7 @@ public class BreakpointManager { ...@@ -166,7 +166,7 @@ public class BreakpointManager {
@Override @Override
public int hashCode() { public int hashCode() {
return (int) (31 * codeOffset + 31 * cls.hashCode() + 31 * mth.hashCode()); return Objects.hash(codeOffset, cls, mth);
} }
@Override @Override
......
...@@ -660,8 +660,8 @@ public class Smali { ...@@ -660,8 +660,8 @@ public class Smali {
private void formatByteCode(StringBuilder smali, byte[] bytes) { private void formatByteCode(StringBuilder smali, byte[] bytes) {
int maxLen = Math.min(bytes.length, 4 * 2); // limit to 4 units int maxLen = Math.min(bytes.length, 4 * 2); // limit to 4 units
StringBuilder inHex = new StringBuilder(); StringBuilder inHex = new StringBuilder();
for (int i = 0; i < maxLen; i++) { for (int i = 0; i < maxLen - 1; i += 2) {
int temp = ((bytes[i++] & 0xff) << 8) | (bytes[i] & 0xff); int temp = ((bytes[i] & 0xff) << 8) | (bytes[i + 1] & 0xff);
inHex.append(String.format("%04x ", temp)); inHex.append(String.format("%04x ", temp));
} }
smali.append(String.format(FMT_BYTECODE_COL, inHex)); smali.append(String.format(FMT_BYTECODE_COL, inHex));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册