From 3441fc21a73e27d3fc4c4b15c30ec8105a2fcf25 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Tue, 17 Sep 2019 16:47:32 +0200 Subject: [PATCH] =?UTF-8?q?[FIX]=20Annots=20=D0=BC=D0=BE=D0=B6=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B1=D1=8B=D1=82=D1=8C=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/pro/gravit/launchserver/asm/NodeUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/NodeUtils.java b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/NodeUtils.java index fbc48c0a..e47c970e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/NodeUtils.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/NodeUtils.java @@ -44,12 +44,12 @@ public static ClassNode forClass(String clazz, int flags, ClassMetadataReader r) public static List annots(String clazz, String method, ClassMetadataReader r) { List 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; }