aboutsummaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoravasseur <avasseur>2005-12-19 15:06:51 +0000
committeravasseur <avasseur>2005-12-19 15:06:51 +0000
commit3509955887685ee99cf2772426bcf74cd3a6e5cb (patch)
treee76f4e7e4808ed9794c3233f21ad6e74ad07436c /tests/java5
parentd9f510b94403fe2d97ef5f124a698cef72e6319b (diff)
downloadaspectj-3509955887685ee99cf2772426bcf74cd3a6e5cb.tar.gz
aspectj-3509955887685ee99cf2772426bcf74cd3a6e5cb.zip
fix NPE in mixing style (can be in concrete aspect from code style as well)
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/ataspectj/ataspectj/DeclareParentsImplementsReweavableTest.java2
-rw-r--r--tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java3
-rw-r--r--tests/java5/ataspectj/ataspectj/bugs/AbstractInherited.java42
3 files changed, 46 insertions, 1 deletions
diff --git a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsReweavableTest.java b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsReweavableTest.java
index fad0d8488..1636328ab 100644
--- a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsReweavableTest.java
+++ b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsReweavableTest.java
@@ -26,7 +26,7 @@ public class DeclareParentsImplementsReweavableTest extends TestCase {
static interface I1 { int do1(); }
- static class Imp1 implements I1 {
+ public static class Imp1 implements I1 {
public int do1() {return 1;}
}
diff --git a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java
index b4cc9ed4e..8ce1e1915 100644
--- a/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java
+++ b/tests/java5/ataspectj/ataspectj/DeclareParentsImplementsTest.java
@@ -41,6 +41,9 @@ public class DeclareParentsImplementsTest extends TestCase {
}
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
diff --git a/tests/java5/ataspectj/ataspectj/bugs/AbstractInherited.java b/tests/java5/ataspectj/ataspectj/bugs/AbstractInherited.java
new file mode 100644
index 000000000..397c1ad18
--- /dev/null
+++ b/tests/java5/ataspectj/ataspectj/bugs/AbstractInherited.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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() {
+ }
+}
+
+