<compile files="AdviceInteraction.java"/>
<run class="AdviceInteraction"/>
</ajc-test>
+
+ <ajc-test dir="bugs/concretizeNpe" pr="43033"
+ title="NPE in concretization error path">
+ <compile files="base/ExceptionHandling.java,model/ModelExceptionHandling.java">
+ <message line="5" kind="error" text="pointcut base.ExceptionHandling.scope() is abstract"/>
+ <message line="4" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
+ <message line="8" kind="error" text="inherited abstract pointcut base.ExceptionHandling.scope() is not made concrete"/>
+ <message line="12" kind="error" text="Unmatched bracket"/>
+ <message line="13" kind="error" text="Syntax error on token"/>
+ </compile>
+ </ajc-test>
+
</suite>
--- /dev/null
+package base;
+
+public abstract aspect ExceptionHandling {
+ public abstract pointcut scope();
+ declare soft: Exception: scope();
+}
--- /dev/null
+
+package model;
+
+import java.lang.RuntimeException;
+
+import base.ExceptionHandling;
+
+public aspect ModelExceptionHandling extends ExceptionHandling {
+ public pointcut scope() : within(*);
+
+ protected RuntimeException convertCheckedException(Throwable t) {
+ return new RuntimeException(t.getMessage(),t
+}
import java.io.IOException;
import java.lang.reflect.Modifier;
-import org.apache.bcel.classfile.JavaClass;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.util.FuzzyBoolean;
+import org.aspectj.weaver.ShadowMunger;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ISourceContext;
import org.aspectj.weaver.IntMap;
if (pointcutDec.isAbstract()) {
//Thread.currentThread().dumpStack();
+ ShadowMunger enclosingAdvice = bindings.getEnclosingAdvice();
searchStart.getWorld().showMessage(IMessage.ERROR,
pointcutDec + " is abstract",
- getSourceLocation(), bindings.getEnclosingAdvice().getSourceLocation());
+ getSourceLocation(),
+ (null == enclosingAdvice) ? null : enclosingAdvice.getSourceLocation());
return Pointcut.makeMatchesNothing(Pointcut.CONCRETE);
}