diff options
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java index 1fb2812bb..62674dedf 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -167,11 +167,7 @@ public class BcelTypeMunger extends ConcreteTypeMunger { } String tname = target.getName(); String pname = newParent.getName(); - List<String> newparents = declareParentsMap.get(tname); - if (newparents == null) { - newparents = new ArrayList<>(); - declareParentsMap.put(tname, newparents); - } + List<String> newparents = declareParentsMap.computeIfAbsent(tname, k -> new ArrayList<>()); newparents.add(pname); AsmRelationshipProvider.addRelationship(model, weaver.getLazyClassGen().getType(), munger, declaringAspect); } |