mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 17:14:25 +02:00
Using sorted static field set in EncodedArrayPool Key.
This commit is contained in:
parent
1d4b31a11c
commit
8191cd9a7a
@ -140,12 +140,13 @@ public class EncodedArrayPool {
|
||||
|
||||
@Nullable
|
||||
public static Key of(@Nonnull ClassDef classDef) {
|
||||
Set<? extends Field> staticFields = FluentIterable.from(classDef.getFields()).filter(IS_STATIC_FIELD).toSet();
|
||||
Iterable<? extends Field> staticFieldsSorted = FluentIterable.from(staticFields).toSortedSet(new FieldComparator());
|
||||
Set<? extends Field> staticFieldsSorted = FluentIterable.from(classDef.getFields())
|
||||
.filter(IS_STATIC_FIELD)
|
||||
.toSortedSet(new FieldComparator());
|
||||
|
||||
int lastIndex = CollectionUtils.lastIndexOf(staticFieldsSorted, HAS_INITIALIZER);
|
||||
if (lastIndex > -1) {
|
||||
return new Key(staticFields, lastIndex+1);
|
||||
return new Key(staticFieldsSorted, lastIndex+1);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user