aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-04-24 21:05:44 +0000
committerjhugunin <jhugunin>2003-04-24 21:05:44 +0000
commit598c72655e13bc4f65d2e357ab645b05b69821ca (patch)
treefb411c9493c52877a5d2480a0e668f3aec8242b8 /tests/new
parent2b231e9fb3e1c1edbca2c28865e7e0901c98c0de (diff)
downloadaspectj-598c72655e13bc4f65d2e357ab645b05b69821ca.tar.gz
aspectj-598c72655e13bc4f65d2e357ab645b05b69821ca.zip
expanded tests and fix for
Bugzilla Bug 36778 ClassFormatError due to empty interface supertype
Diffstat (limited to 'tests/new')
-rw-r--r--tests/new/EmptyInterface.java9
-rw-r--r--tests/new/EmptyInterfaceCE.java32
2 files changed, 37 insertions, 4 deletions
diff --git a/tests/new/EmptyInterface.java b/tests/new/EmptyInterface.java
index db53d592a..aca01b6a8 100644
--- a/tests/new/EmptyInterface.java
+++ b/tests/new/EmptyInterface.java
@@ -17,11 +17,12 @@ public class EmptyInterface {
aspect Log {
static int hits;
static StringBuffer log = new StringBuffer();
- interface LoggedType {}
+ interface LoggedType {
+ }
declare parents: C implements LoggedType;
- void around() : within(LoggedType+)
- && !initialization(new(..))
- && !preinitialization(new(..)) // 1.1 only
+ after() : within(LoggedType+)
+ //&& !initialization(new(..))
+ //&& !preinitialization(new(..)) // 1.1 only
{
hits++;
log.append(thisJoinPoint + ";");
diff --git a/tests/new/EmptyInterfaceCE.java b/tests/new/EmptyInterfaceCE.java
new file mode 100644
index 000000000..4fdbbed33
--- /dev/null
+++ b/tests/new/EmptyInterfaceCE.java
@@ -0,0 +1,32 @@
+
+
+import org.aspectj.testing.Tester;
+
+/** @testcase PR#36778 advise join points in subclass of empty interface */
+public class EmptyInterfaceCE {
+
+ public static void main(String[] args) {
+ new C().go();
+ // at least constructor and method execution
+ if (2 > Log.hits) {
+ Tester.check(false, Log.log.toString());
+ }
+ }
+}
+
+aspect Log {
+ static int hits;
+ static StringBuffer log = new StringBuffer();
+ interface LoggedType {
+ }
+ declare parents: C implements LoggedType;
+ void around() : staticinitialization(LoggedType) // CE: limitation
+ {
+ hits++;
+ log.append(thisJoinPoint + ";");
+ }
+}
+
+class C {
+ void go() {}
+}