aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2017-09-24 22:00:25 -0700
committerAndy Clement <aclement@pivotal.io>2017-09-24 22:00:25 -0700
commitab8339852515f04236d41b9af486ea9f0c50c6c7 (patch)
treeec08d02f6cfa6d4a81fef919a750cb19aa3f4ca4 /weaver
parentad514d54b1014bbfa085096419080c9fc6e1642b (diff)
downloadaspectj-ab8339852515f04236d41b9af486ea9f0c50c6c7.tar.gz
aspectj-ab8339852515f04236d41b9af486ea9f0c50c6c7.zip
Various changes to get tests passing on 1.8 and 1.9
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java4
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java9
-rw-r--r--weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt4
-rw-r--r--weaver/testdata/StaticTjpBeforeHelloWorld.1.9.txt8
-rw-r--r--weaver/testdata/StaticTjpBeforeHelloWorld.txt8
-rw-r--r--weaver/testdata/TjpAround2HelloWorld.1.9.txt8
-rw-r--r--weaver/testdata/TjpAround2HelloWorld.txt8
-rw-r--r--weaver/testdata/TjpAroundHelloWorld.1.9.txt8
-rw-r--r--weaver/testdata/TjpAroundHelloWorld.txt8
-rw-r--r--weaver/testdata/TjpBeforeHelloWorld.1.9.txt8
-rw-r--r--weaver/testdata/TjpBeforeHelloWorld.txt8
11 files changed, 44 insertions, 37 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java b/weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java
index 92f6cbe6d..2f9c4cfe0 100644
--- a/weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java
+++ b/weaver/src/org/aspectj/weaver/bcel/ClassPathManager.java
@@ -310,8 +310,8 @@ public class ClassPathManager {
public static class JImageEntry extends Entry {
private final static FileSystem fs = FileSystems.getFileSystem(JRT_URI);
- private final static Map<String, Path> fileCache = new HashMap<>();
- private final static Map<String, Path> packageCache = new HashMap<>();
+ private final static Map<String, Path> fileCache = new HashMap<String, Path>();
+ private final static Map<String, Path> packageCache = new HashMap<String, Path>();
private static boolean packageCacheInitialized = false;
public JImageEntry() {
diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
index 933402248..08dd909b7 100644
--- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
+++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java
@@ -53,6 +53,7 @@ import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.SourceLocation;
+import org.aspectj.util.LangUtil;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjAttribute.WeaverState;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
@@ -1003,7 +1004,13 @@ public final class LazyClassGen {
return tjpField;
}
- int modifiers = Modifier.STATIC | Modifier.FINAL ;
+ int modifiers = Modifier.STATIC;
+
+ // J9: Can't always be final on Java 9 because it is set outside of clinit
+ // But must be final in interface
+ if (shadow.getEnclosingClass().isInterface()) {
+ modifiers |= Modifier.FINAL;
+ }
// XXX - Do we ever inline before or after advice? If we do, then we
// better include them in the check below. (or just change it to
diff --git a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
index 847ee5214..62425ac53 100644
--- a/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
+++ b/weaver/testdata/StaticEnclosingTjpBeforeHelloWorld.txt
@@ -1,6 +1,6 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$EnclosingStaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$EnclosingStaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$EnclosingStaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$EnclosingStaticPart ajc$tjp_1 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/StaticTjpBeforeHelloWorld.1.9.txt b/weaver/testdata/StaticTjpBeforeHelloWorld.1.9.txt
index 58863d8b4..72ec8a056 100644
--- a/weaver/testdata/StaticTjpBeforeHelloWorld.1.9.txt
+++ b/weaver/testdata/StaticTjpBeforeHelloWorld.1.9.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/StaticTjpBeforeHelloWorld.txt b/weaver/testdata/StaticTjpBeforeHelloWorld.txt
index 587838f4f..ff631f57f 100644
--- a/weaver/testdata/StaticTjpBeforeHelloWorld.txt
+++ b/weaver/testdata/StaticTjpBeforeHelloWorld.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpAround2HelloWorld.1.9.txt b/weaver/testdata/TjpAround2HelloWorld.1.9.txt
index 4e334a65c..242d2be48 100644
--- a/weaver/testdata/TjpAround2HelloWorld.1.9.txt
+++ b/weaver/testdata/TjpAround2HelloWorld.1.9.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; ajc$this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpAround2HelloWorld.txt b/weaver/testdata/TjpAround2HelloWorld.txt
index 6a1affae8..76c19fca8 100644
--- a/weaver/testdata/TjpAround2HelloWorld.txt
+++ b/weaver/testdata/TjpAround2HelloWorld.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; ajc$this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpAroundHelloWorld.1.9.txt b/weaver/testdata/TjpAroundHelloWorld.1.9.txt
index 1e814c70d..65abd2ef6 100644
--- a/weaver/testdata/TjpAroundHelloWorld.1.9.txt
+++ b/weaver/testdata/TjpAroundHelloWorld.1.9.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; ajc$this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpAroundHelloWorld.txt b/weaver/testdata/TjpAroundHelloWorld.txt
index 3643d2c07..6b065bdc9 100644
--- a/weaver/testdata/TjpAroundHelloWorld.txt
+++ b/weaver/testdata/TjpAroundHelloWorld.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; ajc$this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpBeforeHelloWorld.1.9.txt b/weaver/testdata/TjpBeforeHelloWorld.1.9.txt
index 900dc009f..0c34c3bf1 100644
--- a/weaver/testdata/TjpBeforeHelloWorld.1.9.txt
+++ b/weaver/testdata/TjpBeforeHelloWorld.1.9.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V
diff --git a/weaver/testdata/TjpBeforeHelloWorld.txt b/weaver/testdata/TjpBeforeHelloWorld.txt
index c8ed93a86..d169c765c 100644
--- a/weaver/testdata/TjpBeforeHelloWorld.txt
+++ b/weaver/testdata/TjpBeforeHelloWorld.txt
@@ -1,8 +1,8 @@
public class HelloWorld extends java.lang.Object:
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
- private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_1 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_2 [Synthetic]
+ private static org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_3 [Synthetic]
public void <init>():
ALOAD_0 // LHelloWorld; this (line 5)
INVOKESPECIAL java.lang.Object.<init> ()V