From 92a52a21be71734cfe05dc6a8fdbc8a14beba467 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 29 Jun 2010 00:07:59 +0000 Subject: [PATCH] 317139: guard on NPE --- .../src/org/aspectj/weaver/bcel/BcelObjectType.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java index 8f1826c1b..a78aab81d 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelObjectType.java @@ -819,10 +819,13 @@ public class BcelObjectType extends AbstractReferenceTypeDelegate { if (isGeneric()) { // update resolved typex to point at generic type not raw type. ReferenceType genericType = (ReferenceType) this.resolvedTypeX.getGenericType(); - // genericType.setSourceContext(this.resolvedTypeX.getSourceContext() - // ); - genericType.setStartPos(this.resolvedTypeX.getStartPos()); - this.resolvedTypeX = genericType; + // genericType.setSourceContext(this.resolvedTypeX.getSourceContext()); + // Can be null if unpacking whilst building the bcel delegate (in call hierarchy from BcelWorld.addSourceObjectType() + // line 453) - see 317139 + if (genericType != null) { + genericType.setStartPos(this.resolvedTypeX.getStartPos()); + this.resolvedTypeX = genericType; + } } } -- 2.39.5