mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Always use .equals for comparing RegisterType instances
This commit is contained in:
@ -176,7 +176,7 @@ public class AnalyzedInstruction implements Comparable<AnalyzedInstruction> {
|
||||
RegisterType oldRegisterType = preRegisterMap[registerNumber];
|
||||
RegisterType mergedRegisterType = oldRegisterType.merge(registerType);
|
||||
|
||||
if (mergedRegisterType == oldRegisterType) {
|
||||
if (mergedRegisterType.equals(oldRegisterType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ public class AnalyzedInstruction implements Comparable<AnalyzedInstruction> {
|
||||
assert registerType != null;
|
||||
|
||||
RegisterType oldRegisterType = postRegisterMap[registerNumber];
|
||||
if (oldRegisterType == registerType) {
|
||||
if (oldRegisterType.equals(registerType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -277,7 +277,7 @@ public class AnalyzedInstruction implements Comparable<AnalyzedInstruction> {
|
||||
return false;
|
||||
}
|
||||
//check if the uninit ref has been copied to another register
|
||||
if (getPreInstructionRegisterType(registerNumber) == preInstructionDestRegisterType) {
|
||||
if (getPreInstructionRegisterType(registerNumber).equals(preInstructionDestRegisterType)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1253,7 +1253,7 @@ public class MethodAnalyzer {
|
||||
if (preInstructionRegisterType.category == RegisterType.UNINIT_REF ||
|
||||
preInstructionRegisterType.category == RegisterType.UNINIT_THIS) {
|
||||
RegisterType registerType;
|
||||
if (preInstructionRegisterType == objectRegisterType) {
|
||||
if (preInstructionRegisterType.equals(objectRegisterType)) {
|
||||
registerType = analyzedInstruction.postRegisterMap[objectRegister];
|
||||
} else {
|
||||
registerType = preInstructionRegisterType;
|
||||
|
@ -264,7 +264,7 @@ public class RegisterType {
|
||||
|
||||
@Nonnull
|
||||
public RegisterType merge(@Nonnull RegisterType other) {
|
||||
if (other == this) {
|
||||
if (other.equals(this)) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user