mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-09 00:59:44 +03:00
[FIX] Annots может быть null
This commit is contained in:
parent
cc83869725
commit
3441fc21a7
1 changed files with 4 additions and 4 deletions
|
@ -44,12 +44,12 @@ public static ClassNode forClass(String clazz, int flags, ClassMetadataReader r)
|
|||
public static List<AnnotationNode> annots(String clazz, String method, ClassMetadataReader r) {
|
||||
List<AnnotationNode> ret = new ArrayList<>();
|
||||
ClassNode n = forClass(clazz, ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG, r);
|
||||
ret.addAll(n.visibleAnnotations);
|
||||
ret.addAll(n.invisibleAnnotations);
|
||||
if (n.visibleAnnotations != null) ret.addAll(n.visibleAnnotations);
|
||||
if (n.invisibleAnnotations != null) ret.addAll(n.invisibleAnnotations);
|
||||
for (MethodNode m : n.methods)
|
||||
if (method.equals(m.name)) {
|
||||
ret.addAll(n.visibleAnnotations);
|
||||
ret.addAll(n.invisibleAnnotations);
|
||||
if (m.visibleAnnotations != null) ret.addAll(m.visibleAnnotations);
|
||||
if (m.invisibleAnnotations != null) ret.addAll(m.invisibleAnnotations);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue