mirror of
https://github.com/revanced/smali.git
synced 2025-05-09 19:04:32 +02:00
Fix an issue when assembling a file with blank annotation sets
git-svn-id: https://smali.googlecode.com/svn/trunk@776 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
58536878c4
commit
854c577425
@ -66,9 +66,14 @@ public class AnnotationSetItem extends Item<AnnotationSetItem> {
|
|||||||
* @return an <code>AnnotationSetItem</code> for the given annotations
|
* @return an <code>AnnotationSetItem</code> for the given annotations
|
||||||
*/
|
*/
|
||||||
public static AnnotationSetItem internAnnotationSetItem(DexFile dexFile, List<AnnotationItem> annotations) {
|
public static AnnotationSetItem internAnnotationSetItem(DexFile dexFile, List<AnnotationItem> annotations) {
|
||||||
|
AnnotationSetItem annotationSetItem;
|
||||||
|
if (annotations == null) {
|
||||||
|
annotationSetItem = new AnnotationSetItem(dexFile, new AnnotationItem[0]);
|
||||||
|
} else {
|
||||||
AnnotationItem[] annotationsArray = new AnnotationItem[annotations.size()];
|
AnnotationItem[] annotationsArray = new AnnotationItem[annotations.size()];
|
||||||
annotations.toArray(annotationsArray);
|
annotations.toArray(annotationsArray);
|
||||||
AnnotationSetItem annotationSetItem = new AnnotationSetItem(dexFile, annotationsArray);
|
annotationSetItem = new AnnotationSetItem(dexFile, annotationsArray);
|
||||||
|
}
|
||||||
return dexFile.AnnotationSetsSection.intern(annotationSetItem);
|
return dexFile.AnnotationSetsSection.intern(annotationSetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user