Bug 433423 - [compiler] warn when compiling for OTRE and binding to 1.8
classes
- tests adjustment
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutMethodBinding.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutMethodBinding.java
index 5e5d1af..8f69a91 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutMethodBinding.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutMethodBinding.java
@@ -22,6 +22,7 @@
 import junit.framework.Test;
 
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 @SuppressWarnings("unchecked")
@@ -3134,12 +3135,33 @@
 			    "	}\n" + 
 			    "}\n",
             },
+            (this.weavingScheme == WeavingScheme.OTDRE
+            ?
             "----------\n" + 
             "1. ERROR in t\\Team3117ic14_2.java (at line 9)\n" + 
             "	Zork extra2;\n" + 
             "	^^^^\n" + 
             "Zork cannot be resolved to a type\n" + 
-            "----------\n",
+            "----------\n"
+            :
+    		"----------\n" + 
+    		"1. WARNING in t\\Team3117ic14_2.java (at line 7)\n" + 
+    		"	protected class Role1 {\n" + 
+    		"	                ^^^^^\n" + 
+    		"Base class b.BaseClass has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n" + 
+    		"2. ERROR in t\\Team3117ic14_2.java (at line 9)\n" + 
+    		"	Zork extra2;\n" + 
+    		"	^^^^\n" + 
+    		"Zork cannot be resolved to a type\n" + 
+    		"----------\n" + 
+    		"----------\n" + 
+    		"1. WARNING in t\\Team3117ic14_1.java (at line 10)\n" + 
+    		"	protected class Role1 implements IBase playedBy BaseClass {\n" + 
+    		"	                                                ^^^^^^^^^\n" + 
+    		"Base class b.BaseClass has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n"
+    		),
             null,//libs
             false,//flush
             customOptions);
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
index 05b60b3..80dbce6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
@@ -3988,9 +3988,13 @@
 			    "    void test() throws NoSuchMethodException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? "" // skip execution
+			    :
 			    "    public static void main(String[] args) throws NoSuchMethodException {\n" +
 			    "        new TeamA117cfa5_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"TeamA117cfa5_1.java",
@@ -4020,7 +4024,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa5_2(left=one, right=@IA117cfa5_1(value=two))");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+		    : "@IA117cfa5_2(left=one, right=@IA117cfa5_1(value=two))"));
     }
 
     // a role method has a custom annotation with enum values, annotation was in conflict with implicit activation annotation
@@ -4047,9 +4053,13 @@
 			    "    void test() throws NoSuchMethodException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? "" // skip execution
+			    :
 			    "    public static void main(String[] args) throws NoSuchMethodException {\n" +
 			    "        new TeamA117cfa5e_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"EA117cfa5e_2.java",
@@ -4086,7 +4096,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa5e(val1=TWO, val2=C)@org.objectteams.ImplicitTeamActivation()Active");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+		    : "@IA117cfa5e(val1=TWO, val2=C)@org.objectteams.ImplicitTeamActivation()Active"));
     }
 
     // a role field is deprecated, so should be its tsub
@@ -4150,9 +4162,13 @@
 			    "    void test() throws NoSuchFieldException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? "" // skip execution
+			    :
 			    "    public static void main(String[] args) throws NoSuchFieldException {\n" +
 			    "        new TeamA117cfa7_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"IA117cfa7.java",
@@ -4173,7 +4189,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa7(value=[one, two])");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+		    : "@IA117cfa7(value=[one, two])"));
     }
 
     // a role field has a custom annotation (scalar arg), so should its tsub  -  testing at runtime via reflection
@@ -4199,9 +4217,13 @@
 			    "    void test() throws NoSuchFieldException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? ""
+	    		:
 			    "    public static void main(String[] args) throws NoSuchFieldException {\n" +
 			    "        new TeamA117cfa8_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"IA117cfa8.java",
@@ -4222,7 +4244,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa8(value=val)");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+    		: "@IA117cfa8(value=val)"));
     }
 
     // a role field has a custom annotation (enum typed arg), so should its tsub  -  testing at runtime via reflection
@@ -4248,9 +4272,13 @@
 			    "    void test() throws NoSuchFieldException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? ""
+	    		:
 			    "    public static void main(String[] args) throws NoSuchFieldException {\n" +
 			    "        new TeamA117cfa8e_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"TeamA117cfa8e_1.java",
@@ -4272,7 +4300,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa8e(theVal=TWO)");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+		    : "@IA117cfa8e(theVal=TWO)"));
     }
 
     // a role field has a custom annotation, so should its tsub  -  testing at runtime via reflection
@@ -4298,9 +4328,13 @@
 			    "    void test() throws NoSuchFieldException {\n" +
 			    "        new R().test();\n" +
 			    "    }\n" +
+			    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+			    ? ""
+	    		:
 			    "    public static void main(String[] args) throws NoSuchFieldException {\n" +
 			    "        new TeamA117cfa9_2().test();\n" +
-			    "    }\n" +
+			    "    }\n"
+			    ) +
 			    "}\n" +
 			    "    \n",
 		"TeamA117cfa9_1.java",
@@ -4321,7 +4355,9 @@
 			    "}\n" +
 			    "    \n"
             },
-            "@IA117cfa9(value=[1, 2])");
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ? ""
+    		: "@IA117cfa9(value=[1, 2])"));
     }
 
     // a role class extends a generic class providing type parameters
@@ -4629,6 +4665,15 @@
     		"	                                            ^^^^^^^^^^^^^^\n" + 
     		"Qualified reference to base class pb.TA119nvp4_2 is deprecated, should use a base import instead (OTJLD 2.1.2(d)).\n" + 
     		"----------\n" + 
+    		(this.weavingScheme == WeavingScheme.OTRE
+    		? 
+			"2. WARNING in pt\\TeamA119nvp4.java (at line 6)\n" + 
+			"	public class Role extends Showable playedBy pb.TA119nvp4_2 {\n" + 
+			"	                                            ^^^^^^^^^^^^^^\n" + 
+			"Base class pb.TA119nvp4_2 has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+			"----------\n"
+    		: ""
+			) +
     		"----------\n" + 
     		"1. ERROR in TA119nvp4Main.java (at line 6)\n" + 
     		"	pb.TA119nvp4_1<@t1,Role<@t1>> c = new pb.TA119nvp4_1<@t1,Role<@t1>>();\n" + 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
index 74ca617..333529b 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
@@ -20,7 +20,9 @@
 
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 import junit.framework.Test;
@@ -1390,10 +1392,12 @@
     public void testB11_sh36() {
         runNegativeTestMatching(
             new String[] {
+		"TB11sh36.java",
+				"public class TB11sh36 {}\n",
 		"TeamB11sh36.java",
 			    "\n" +
 			    "public team class TeamB11sh36 {\n" +
-			    "    protected class R playedBy Object {\n" +
+			    "    protected class R playedBy TB11sh36 {\n" +
 			    "        toString =>  // incomplete\n" +
 			    "        R() {}\n" +
 			    "        @SuppressWarnings(\"basecall\")\n" +
@@ -1404,22 +1408,16 @@
 			    "}\n" +
 			    "    \n"
             },
-            "----------\n" + 
-    		"1. WARNING in TeamB11sh36.java (at line 3)\n" + 
-    		"	protected class R playedBy Object {\n" + 
-    		"	                           ^^^^^^\n" + 
-    		"Base class java.lang.Object appears to be a system class, which means that load time weaving could possibly fail\n" + 
-    		"if this class is loaded from rt.jar/the bootstrap classpath.\n" + 
     		"----------\n" + 
-    		"2. ERROR in TeamB11sh36.java (at line 4)\n" + 
+    		"1. ERROR in TeamB11sh36.java (at line 4)\n" + 
     		"	toString =>  // incomplete\n" + 
     		"	         ^^\n" + 
     		"Syntax error on token \"=>\", delete this token\n" + 
     		"----------\n" + 
-    		"3. ERROR in TeamB11sh36.java (at line 5)\n" + 
+    		"2. ERROR in TeamB11sh36.java (at line 5)\n" + 
     		"	R() {}\n" + 
     		"	^\n" + 
-    		"No method R found in type java.lang.Object to resolve method designator (OTJLD 3.1(c)).\n" + 
+    		"No method R found in type TB11sh36 to resolve method designator (OTJLD 3.1(c)).\n" + 
     		"----------\n");
     }
 
@@ -2082,6 +2080,40 @@
 			    "}\n" +
 			    "    \n"
             },
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ?
+    		"----------\n" + 
+    		"1. WARNING in TeamB11sh47.java (at line 6)\n" + 
+    		"	protected class R1 playedBy JFrame {\n" + 
+    		"	                            ^^^^^^\n" + 
+    		"Base class javax.swing.JFrame has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n" + 
+    		"2. ERROR in TeamB11sh47.java (at line 11)\n" + 
+    		"	correct <- replace show;\n" + 
+    		"	                   ^^^^\n" + 
+    		"Method specifier \"show\" is ambiguous for the type javax.swing.JFrame. Please use the exact method signature to disambiguate (OTJLD 4.1(c)).\n" + 
+    		"----------\n" + 
+    		"3. ERROR in TeamB11sh47.java (at line 14)\n" + 
+    		"	protected class Unfinished playedBy\n" + 
+    		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+    		"Syntax error on token(s), misplaced construct(s)\n" + 
+    		"----------\n" + 
+    		"4. ERROR in TeamB11sh47.java (at line 15)\n" + 
+    		"	protected class R3 playedBy String {\n" + 
+    		"	                ^^\n" + 
+    		"Member types not allowed in regular roles. Mark class TeamB11sh47.Unfinished as a team if R3 should be its role (OTJLD 1.5(a,b)). \n" + 
+    		"----------\n" + 
+    		"5. WARNING in TeamB11sh47.java (at line 15)\n" + 
+    		"	protected class R3 playedBy String {\n" + 
+    		"	                            ^^^^^^\n" + 
+    		"PlayedBy binding overrides finalness of base class java.lang.String (OTJLD 2.1.2(c)).\n" + 
+    		"----------\n" + 
+    		"6. WARNING in TeamB11sh47.java (at line 15)\n" + 
+    		"	protected class R3 playedBy String {\n" + 
+    		"	                            ^^^^^^\n" + 
+    		"Base class java.lang.String has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n"
+		    :
             "----------\n" + 
     		"1. ERROR in TeamB11sh47.java (at line 11)\n" + 
     		"	correct <- replace show;\n" + 
@@ -2102,7 +2134,8 @@
     		"	protected class R3 playedBy String {\n" + 
     		"	                            ^^^^^^\n" + 
     		"PlayedBy binding overrides finalness of base class java.lang.String (OTJLD 2.1.2(c)).\n" + 
-    		"----------\n",
+    		"----------\n"
+    		),
     		null/*classLibraries*/,
     		true/*shouldFlushOutputDirectory*/,
     		customOptions);
@@ -3951,6 +3984,25 @@
 			    "    \n"
             },
             // FIXME(SH): why these errors:?
+		    (this.weavingScheme == WeavingScheme.OTRE && this.complianceLevel >= ClassFileConstants.JDK1_8
+		    ?
+    		"----------\n" + 
+    		"1. WARNING in TeamB11sh86_2.java (at line 5)\n" + 
+    		"	protected class R playedBy TB11sh86_2 {\n" + 
+    		"	                           ^^^^^^^^^^\n" + 
+    		"Base class TB11sh86_2 has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n" + 
+    		"2. ERROR in TeamB11sh86_2.java (at line 6)\n" + 
+    		"	getBase -> bm;\n" + 
+    		"	^^^^^^^\n" + 
+    		"A non-abstract role method exists for this callout-binding. Use callout-override (\'=>\') if you want to override it (OTJLD 3.1(e)).\n" + 
+    		"----------\n" + 
+    		"3. ERROR in TeamB11sh86_2.java (at line 6)\n" + 
+    		"	getBase -> bm;\n" + 
+    		"	^^^^^^^\n" + 
+    		"The return type is incompatible with TeamB11sh86_1.R.getBase(Object)\n" + 
+    		"----------\n"
+    		:
             "----------\n" + 
     		"1. ERROR in TeamB11sh86_2.java (at line 6)\n" + 
     		"	getBase -> bm;\n" + 
@@ -3961,7 +4013,8 @@
     		"	getBase -> bm;\n" + 
     		"	^^^^^^^\n" + 
     		"The return type is incompatible with TeamB11sh86_1.R.getBase(Object)\n" + 
-    		"----------\n",
+    		"----------\n"
+    		),
             null/*classLibraries*/,
             false/*shouldFlushOutputDirectory*/,
             customOptions,
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java
index 4bbe522..977015a 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/LiftingAndLowering.java
@@ -22,6 +22,7 @@
 import junit.framework.Test;
 
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 @SuppressWarnings("unchecked")
@@ -4495,12 +4496,27 @@
 			    "    }\n" +
 			    "}\n"
             },
+            (this.weavingScheme == WeavingScheme.OTDRE
+            ?
             "----------\n" + 
     		"1. ERROR in Team2228dlic6l_3.java (at line 4)\n" + 
     		"	public Team2228dlic6l_3(T2228dlic6l as R2 r) {\n" + 
     		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
     		"Compiler limitation: This constructor seems to request lifting of an argument. However, the self call in Team2228dlic6l_2(R) of class Team2228dlic6l_2 passes its arguments in an unexpected way. Cannot perform required transitive byte-code translation.\n" + 
-    		"----------\n",
+    		"----------\n"
+    		:
+            "----------\n" + 
+    		"1. WARNING in Team2228dlic6l_3.java (at line 3)\n" + 
+    		"	public class R2 extends R playedBy T2228dlic6l {}\n" + 
+    		"	                                   ^^^^^^^^^^^\n" + 
+    		"Base class T2228dlic6l has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+            "----------\n" + 
+    		"2. ERROR in Team2228dlic6l_3.java (at line 4)\n" + 
+    		"	public Team2228dlic6l_3(T2228dlic6l as R2 r) {\n" + 
+    		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+    		"Compiler limitation: This constructor seems to request lifting of an argument. However, the self call in Team2228dlic6l_2(R) of class Team2228dlic6l_2 passes its arguments in an unexpected way. Cannot perform required transitive byte-code translation.\n" + 
+    		"----------\n"
+            ),
         	null/*classLibraries*/,
         	false/*shouldFlushOutputDirectory*/);
     }
@@ -4675,12 +4691,26 @@
 			    "}    \n" +
 			    "    \n"
             },
+            (this.weavingScheme == WeavingScheme.OTDRE
+            ?
             "----------\n" + 
     		"1. ERROR in Team2228dlic7l_3.java (at line 4)\n" + 
     		"	public Team2228dlic7l_3(T2228dlic7l as R2 r) {\n" + 
     		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
     		"Compiler limitation: This constructor seems to request lifting of an argument. However, the self call in Team2228dlic7l_2(R) of class Team2228dlic7l_2 passes its arguments in an unexpected way. Cannot perform required transitive byte-code translation.\n" + 
-    		"----------\n",
+    		"----------\n"
+    		:
+    		"1. WARNING in Team2228dlic7l_3.java (at line 3)\n" + 
+    		"	public class R2 extends R playedBy T2228dlic7l {}\n" + 
+    		"	                                   ^^^^^^^^^^^\n" + 
+    		"Base class T2228dlic7l has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+            "----------\n" + 
+    		"2. ERROR in Team2228dlic7l_3.java (at line 4)\n" + 
+    		"	public Team2228dlic7l_3(T2228dlic7l as R2 r) {\n" + 
+    		"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+    		"Compiler limitation: This constructor seems to request lifting of an argument. However, the self call in Team2228dlic7l_2(R) of class Team2228dlic7l_2 passes its arguments in an unexpected way. Cannot perform required transitive byte-code translation.\n" + 
+    		"----------\n"
+        	),
             null/*classLibraries*/,
             false/*shouldFlushOutputDirectory*/);
     }
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
index d9f359c..9c44cd4 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/roleplaying/PlayedByRelation.java
@@ -19,7 +19,9 @@
 
 import java.util.Map;
 
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.objectteams.otdt.core.ext.WeavingScheme;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
 import junit.framework.Test;
@@ -2280,13 +2282,29 @@
 			    "}\n" +
 			    "    \n"
             },
+            (this.weavingScheme == WeavingScheme.OTDRE
+            ?
             "----------\n" + 
     		"1. WARNING in Team2110bi6.java (at line 4)\n" + 
     		"	protected class Role playedBy JFrame {}\n" + 
     		"	                              ^^^^^^\n" + 
     		"Base class javax.swing.JFrame appears to be a system class, which means that load time weaving could possibly fail\n" + 
     		"if this class is loaded from rt.jar/the bootstrap classpath.\n" + 
-    		"----------\n",
+    		"----------\n"
+    		:
+    		"----------\n" + 
+    		"1. WARNING in Team2110bi6.java (at line 4)\n" + 
+    		"	protected class Role playedBy JFrame {}\n" + 
+    		"	                              ^^^^^^\n" + 
+    		"Base class javax.swing.JFrame has class file version 52 which cannot be handled by the traditional OTRE based on BCEL. Please consider using the ASM based OTDRE instead.\n" + 
+    		"----------\n" + 
+    		"2. WARNING in Team2110bi6.java (at line 4)\n" + 
+    		"	protected class Role playedBy JFrame {}\n" + 
+    		"	                              ^^^^^^\n" + 
+    		"Base class javax.swing.JFrame appears to be a system class, which means that load time weaving could possibly fail\n" + 
+    		"if this class is loaded from rt.jar/the bootstrap classpath.\n" + 
+    		"----------\n"
+            ),
     		customOptions);
     }
 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
index 1af31f7..582118a 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
@@ -535,10 +535,12 @@
     public void test861_parammapIllegalSemi1() {
         runNegativeTest(
             new String[] {
+		"T861pis1.java",
+				"public class T861pis1 {}\n",
 		"Team861pis1.java",
 			    "\n" +
 			    "public team class Team861pis1 {\n" +
-			    "	protected class Role playedBy Object {\n" +
+			    "	protected class Role playedBy T861pis1{\n" +
 			    "		abstract String getHashStr();\n" +
 			    "		\n" +
 			    "		String getHashStr() -> boolean equals(Object other) with {\n" +
@@ -549,14 +551,8 @@
 			    "}\n" +
 			    "	\n"
             },
-            "----------\n" + 
-    		"1. WARNING in Team861pis1.java (at line 3)\n" + 
-    		"	protected class Role playedBy Object {\n" + 
-    		"	                              ^^^^^^\n" + 
-    		"Base class java.lang.Object appears to be a system class, which means that load time weaving could possibly fail\n" + 
-    		"if this class is loaded from rt.jar/the bootstrap classpath.\n" + 
     		"----------\n" + 
-    		"2. ERROR in Team861pis1.java (at line 7)\n" + 
+    		"1. ERROR in Team861pis1.java (at line 7)\n" + 
     		"	this -> other;\n" + 
     		"	             ^\n" + 
     		"Syntax error on token \";\", , expected\n" + 
@@ -1160,11 +1156,12 @@
     public void test8112_declaredLiftingSyntaxError1() {
         runNegativeTest(
             new String[] {
+		"T8112dlse1.java",
+				"public class T8112dlse1 {}\n",
 		"Team8112dlse1.java",
 			    "\n" +
 			    "public team class Team8112dlse1 {\n" +
-			    "   @SuppressWarnings(\"bindingtosystemclass\")\n" +
-			    "	protected class R playedBy Object {\n" +
+			    "	protected class R playedBy T8112dlse1 {\n" +
 			    "		int bla;\n" +
 			    "	}\n" +
 			    "	void run(Object as R)  {\n" +
@@ -1175,7 +1172,7 @@
 			    "	\n"
             },
             "----------\n" + 
-    		"1. ERROR in Team8112dlse1.java (at line 7)\n" + 
+    		"1. ERROR in Team8112dlse1.java (at line 6)\n" + 
     		"	void run(Object as R)  {\n" + 
     		"	                   ^\n" + 
     		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
@@ -1187,12 +1184,13 @@
     public void test8112_declaredLiftingSyntaxError2() {
         runNegativeTestMatching(
             new String[] {
+		"T8112dlse2.java",
+				"public class T8112dlse2 {}\n",
 		"Team8112dlse2.java",
 			    "\n" +
 			    "public team class Team8112dlse2 {\n" +
 			    "	protected team class Mid {\n" +
-			    "       @SuppressWarnings(\"bindingtosystemclass\")\n" +
-			    "		protected class R playedBy Object {\n" +
+			    "		protected class R playedBy T8112dlse2 {\n" +
 			    "			int bla;\n" +
 			    "		}\n" +
 			    "		callin void run(Object as R)  {\n" +
@@ -1203,17 +1201,17 @@
 			    "	\n"
             },
             "----------\n" + 
-    		"1. ERROR in Team8112dlse2.java (at line 8)\n" + 
+    		"1. ERROR in Team8112dlse2.java (at line 7)\n" + 
     		"	callin void run(Object as R)  {\n" + 
     		"	                          ^\n" + 
     		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n" + 
-    		"2. ERROR in Team8112dlse2.java (at line 11)\n" + 
+    		"2. ERROR in Team8112dlse2.java (at line 10)\n" + 
     		"	}\n" + 
     		"	^\n" + 
     		"Syntax error on token \"}\", delete this token\n" + 
     		"----------\n" + 
-    		"3. ERROR in Team8112dlse2.java (at line 12)\n" + 
+    		"3. ERROR in Team8112dlse2.java (at line 11)\n" + 
     		"	}\n" + 
     		"	^\n" + 
     		"Syntax error, insert \"}\" to complete ClassBody\n" +