mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Gracefully handle duplicate methods and fields in baksmali
baksmali will emit duplicate methods and fields as commented blocks, when it is safe to do so.
This commit is contained in:
@ -201,6 +201,25 @@ public class FieldIdItem extends Item<FieldIdItem> implements Convertible<FieldI
|
||||
return cachedFieldString;
|
||||
}
|
||||
|
||||
String cachedShortFieldString = null;
|
||||
/**
|
||||
* @return a "short" string containing just the field name and type, formatted like fieldName:fieldType
|
||||
*/
|
||||
public String getShortFieldString() {
|
||||
if (cachedShortFieldString == null) {
|
||||
String fieldName = this.fieldName.getStringValue();
|
||||
String fieldType = this.fieldType.getTypeDescriptor();
|
||||
|
||||
StringBuffer sb = new StringBuffer(fieldName.length() + fieldType.length() + 1);
|
||||
sb.append(fieldName);
|
||||
sb.append(":");
|
||||
sb.append(fieldType);
|
||||
cachedShortFieldString = sb.toString();
|
||||
}
|
||||
return cachedShortFieldString;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* calculate and cache the hashcode
|
||||
*/
|
||||
|
Reference in New Issue
Block a user