static interface I1 { int do1(); }
- static class Imp1 implements I1 {
+ public static class Imp1 implements I1 {
public int do1() {return 1;}
}
}
static class Implementation implements Introduced {
+ public Implementation(int i) {}
+ public Implementation() {}
+
public void intro() {
log("intro-"+field1);
// we cannot copy the raw bytecode as there might be super.* calls, and other OO stuff
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2005 Contributors.
+ * All rights reserved.
+ * This program and the accompanying materials are made available
+ * under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution and is available at
+ * http://eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Alexandre Vasseur initial implementation
+ *******************************************************************************/
+package ataspectj.bugs;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Around;
+
+/**
+ * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
+ */
+//@Aspect
+public abstract aspect AbstractInherited {
+
+ //@Around("execution(* foo(..))")
+ //public Object around() {
+ // return null;
+ //}
+
+ void around(): execution(* foo(..)) {
+ }
+
+}
+
+@Aspect
+class Sub extends AbstractInherited {
+}
+
+class C {
+ void foo() {
+ }
+}
+
+
runTest("AbstractAspectNPE");
}
+ public void testAbstractInherited() {
+ runTest("AbstractInherited");
+ }
+
}
</compile>
</ajc-test>
+
+ <ajc-test dir="java5/ataspectj" title="AbstractInherited">
+ <compile files="ataspectj/bugs/AbstractInherited.java"
+ options="-1.5 -showWeaveInfo">
+ <message kind="weave" text="Join point "/>
+ </compile>
+ </ajc-test>
+
</suite>
\ No newline at end of file
}
} else if (hasExtraParameter()) {
previousIsClosure = false;
- extraVar.appendLoadAndConvert(
- il,
- fact,
- getExtraParameterType().resolve(world));
- } else {
+ //extra var can be null here (@Aj aspect extends abstract code style, advice in code style)
+ if (extraVar != null) {
+ extraVar.appendLoadAndConvert(
+ il,
+ fact,
+ getExtraParameterType().resolve(world));
+ }
+ } else {
previousIsClosure = false;
getConcreteAspect().getWorld().getMessageHandler().handleMessage(
new Message(