diff options
author | mikaelpeltier <mikaelpeltier@google.com> | 2014-06-24 11:32:54 +0200 |
---|---|---|
committer | mikaelpeltier <mikaelpeltier@google.com> | 2014-06-24 12:15:00 +0200 |
commit | fd2b18cf85c8eb1d894aecdad900b4cc5518713b (patch) | |
tree | 963bd3cb8dfa3a0e928c5a2da8a86f261e5e7bab /dx | |
parent | 826d108d8c0b8bc88d0593f4eb9ab694685c158d (diff) | |
download | toolchain_jack-fd2b18cf85c8eb1d894aecdad900b4cc5518713b.zip toolchain_jack-fd2b18cf85c8eb1d894aecdad900b4cc5518713b.tar.gz toolchain_jack-fd2b18cf85c8eb1d894aecdad900b4cc5518713b.tar.bz2 |
Change sorting of AnnotationsDirectoryItem
- Do the sort of AnnotationDirectoryItem content earlier allows
to be deterministic with this item.
Change-Id: I43c0e957e6f44f9104dc0112414bf74ba65fcbe7
Diffstat (limited to 'dx')
-rw-r--r-- | dx/src/com/android/jack/dx/dex/file/AnnotationsDirectoryItem.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dx/src/com/android/jack/dx/dex/file/AnnotationsDirectoryItem.java b/dx/src/com/android/jack/dx/dex/file/AnnotationsDirectoryItem.java index 13f727a..481b7fb 100644 --- a/dx/src/com/android/jack/dx/dex/file/AnnotationsDirectoryItem.java +++ b/dx/src/com/android/jack/dx/dex/file/AnnotationsDirectoryItem.java @@ -235,18 +235,21 @@ public final class AnnotationsDirectoryItem extends OffsettedItem { } if (fieldAnnotations != null) { + Collections.sort(fieldAnnotations); for (FieldAnnotationStruct item : fieldAnnotations) { item.addContents(file); } } if (methodAnnotations != null) { + Collections.sort(methodAnnotations); for (MethodAnnotationStruct item : methodAnnotations) { item.addContents(file); } } if (parameterAnnotations != null) { + Collections.sort(parameterAnnotations); for (ParameterAnnotationStruct item : parameterAnnotations) { item.addContents(file); } @@ -292,8 +295,7 @@ public final class AnnotationsDirectoryItem extends OffsettedItem { out.writeInt(parametersSize); if (fieldsSize != 0) { - Collections.sort(fieldAnnotations); - if (annotates) { + if (annotates) { out.annotate(0, " fields:"); } for (FieldAnnotationStruct item : fieldAnnotations) { @@ -302,7 +304,6 @@ public final class AnnotationsDirectoryItem extends OffsettedItem { } if (methodsSize != 0) { - Collections.sort(methodAnnotations); if (annotates) { out.annotate(0, " methods:"); } @@ -312,7 +313,6 @@ public final class AnnotationsDirectoryItem extends OffsettedItem { } if (parametersSize != 0) { - Collections.sort(parameterAnnotations); if (annotates) { out.annotate(0, " parameters:"); } |