Fix method sorting in AnnotationDirectoryPool

This commit is contained in:
Ben Gruver 2012-12-29 14:51:07 -08:00
parent 7d5439950f
commit 5152315e25

View File

@ -152,7 +152,7 @@ public class AnnotationDirectoryPool {
writer.writeInt(dexFile.annotationSetPool.getOffset(field.getAnnotations()));
}
boolean sortMethods = CollectionUtils.isNaturalSortedSet(key.classDef.getMethods());
boolean sortMethods = !CollectionUtils.isNaturalSortedSet(key.classDef.getMethods());
Iterable<? extends Method> methodsWithAnnotations = null;
if (sortMethods) {
methodsWithAnnotations = Lists.newArrayList(key.getMethodsWithAnnotations());