]> source.dussan.org Git - aspectj.git/commitdiff
320425: handle changes
authoraclement <aclement>
Fri, 23 Jul 2010 00:19:22 +0000 (00:19 +0000)
committeraclement <aclement>
Fri, 23 Jul 2010 00:19:22 +0000 (00:19 +0000)
tests/src/org/aspectj/systemtest/ajc153/JDTLikeHandleProviderTests.java
tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
tests/src/org/aspectj/systemtest/ajc1610/Ajc1610Tests.java
tests/src/org/aspectj/systemtest/ajc1610/ajc1610.xml
tests/src/org/aspectj/systemtest/ajc163/Ajc163Tests.java
tests/src/org/aspectj/systemtest/ajc164/Ajc164Tests.java
tests/src/org/aspectj/systemtest/ajc169/IntertypeTests.java
tests/src/org/aspectj/systemtest/incremental/tools/IncrementalCompilationTests.java
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

index 44420618cf27bdabed3ea87bf1b0f43b343c2fad..c2f586b4aeb45bf9926efc8a313d294232723ee8 100644 (file)
@@ -45,25 +45,25 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
                runTest("aspect handle");
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
                IProgramElement pe = top.findElementForType("pkg", "A1");
-               String expected = "<pkg*A1.aj}A1";
+               String expected = "<pkg*A1.aj'A1";
                String found = pe.getHandleIdentifier();
                assertEquals("handleIdentifier - expected " + expected + ", but found " + found, expected, found);
        }
 
        public void testAdviceHandle() {
                runTest("advice handle");
-               compareHandles(IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>", "<pkg*A2.aj}A2&before");
+               compareHandles(IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>", "<pkg*A2.aj'A2&before");
        }
 
        public void testPointcutHandle() {
                runTest("pointcut handle");
-               compareHandles(IProgramElement.Kind.POINTCUT, "p()", "<pkg*A4.aj}A4+p");
+               compareHandles(IProgramElement.Kind.POINTCUT, "p()", "<pkg*A4.aj'A4\"p");
        }
 
        public void testGetIPEWithAspectHandle() {
                runTest("get IProgramElement with aspect handle");
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
-               String handle = "<pkg*A1.aj}A1";
+               String handle = "<pkg*A1.aj'A1";
                IProgramElement ipe = top.getElement(handle);
                assertNotNull("should have found ipe with handle " + handle, ipe);
                IProgramElement ipe2 = top.getElement(handle);
@@ -72,49 +72,49 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
 
        public void testAdviceHandleWithCrossCutting() {
                runTest("advice handle with crosscutting");
-               compareHandles(IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>", "<pkg*A3.aj}A3&before");
+               compareHandles(IProgramElement.Kind.ADVICE, "before(): <anonymous pointcut>", "<pkg*A3.aj'A3&before");
        }
 
        public void testPointcutHandleWithArgs() {
                runTest("pointcut handle with args");
-               compareHandles(IProgramElement.Kind.POINTCUT, "p(java.lang.Integer)", "<*A6.aj}A6+p+QInteger;");
+               compareHandles(IProgramElement.Kind.POINTCUT, "p(java.lang.Integer)", "<*A6.aj'A6\"p\"QInteger;");
        }
 
        public void testAdviceHandleWithArgs() {
                runTest("advice handle with args");
                compareHandles(IProgramElement.Kind.ADVICE, "afterReturning(java.lang.Integer): p..",
-                               "<pkg*A8.aj}A8&afterReturning&QInteger;");
+                               "<pkg*A8.aj'A8&afterReturning&QInteger;");
        }
 
        public void testFieldITD() {
                runTest("field itd handle");
-               compareHandles(IProgramElement.Kind.INTER_TYPE_FIELD, "C.x", "<pkg*A9.aj}A9)C.x");
+               compareHandles(IProgramElement.Kind.INTER_TYPE_FIELD, "C.x", "<pkg*A9.aj'A9,C.x");
        }
 
        public void testMethodITD() {
                runTest("method itd handle");
-               compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD, "C.method()", "<pkg*A9.aj}A9)C.method");
+               compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD, "C.method()", "<pkg*A9.aj'A9)C.method");
        }
 
        public void testMethodITDWithArgs() {
                runTest("method itd with args handle");
-               compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD, "C.methodWithArgs(int)", "<pkg*A9.aj}A9)C.methodWithArgs)I");
+               compareHandles(IProgramElement.Kind.INTER_TYPE_METHOD, "C.methodWithArgs(int)", "<pkg*A9.aj'A9)C.methodWithArgs)I");
        }
 
        public void testConstructorITDWithArgs() {
                runTest("constructor itd with args");
                compareHandles(IProgramElement.Kind.INTER_TYPE_CONSTRUCTOR, "C.C(int,java.lang.String)",
-                               "<pkg*A13.aj}A13)C.C_new)I)QString;");
+                               "<pkg*A13.aj'A13)C.C_new)I)QString;");
        }
 
        public void testDeclareParentsHandle() {
                runTest("declare parents handle");
-               compareHandles(IProgramElement.Kind.DECLARE_PARENTS, "declare parents: implements C2", "<pkg*A7.aj}A7`declare parents");
+               compareHandles(IProgramElement.Kind.DECLARE_PARENTS, "declare parents: implements C2", "<pkg*A7.aj'A7`declare parents");
        }
 
        public void testTwoDeclareParents() {
                runTest("two declare parents in same file");
-               compareHandles(IProgramElement.Kind.DECLARE_PARENTS, "declare parents: extends C5", "<pkg*A7.aj}A7`declare parents!2");
+               compareHandles(IProgramElement.Kind.DECLARE_PARENTS, "declare parents: extends C5", "<pkg*A7.aj'A7`declare parents!2");
        }
 
        public void testMethodCallHandle() {
@@ -126,28 +126,28 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
                // AJDT: =AJHandleProject/src<pkg*A.aj}A`declare \@type
                runTest("declare @type");
                compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_TYPE, "declare @type: pkg.C : @MyAnnotation",
-                               "<pkg*A12.aj}A`declare \\@type");
+                               "<pkg*A12.aj'A`declare \\@type");
        }
 
        public void testDeclareAtField() {
                // AJDT: =AJHandleProject/src<pkg*A.aj}A`declare \@field
                runTest("declare @field");
                compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_FIELD, "declare @field: int pkg.C.someField : @MyAnnotation",
-                               "<pkg*A12.aj}A`declare \\@field");
+                               "<pkg*A12.aj'A`declare \\@field");
        }
 
        public void testDeclareAtMethod() {
                // AJDT: =AJHandleProject/src<pkg*A.aj}A`declare \@method
                runTest("declare @method");
                compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_METHOD,
-                               "declare @method: public void pkg.C.method1() : @MyAnnotation", "<pkg*A12.aj}A`declare \\@method");
+                               "declare @method: public void pkg.C.method1() : @MyAnnotation", "<pkg*A12.aj'A`declare \\@method");
        }
 
        public void testDeclareAtConstructor() {
                // AJDT: =AJHandleProject/src<pkg*A.aj}A`declare \@constructor
                runTest("declare @constructor");
                compareHandles(IProgramElement.Kind.DECLARE_ANNOTATION_AT_CONSTRUCTOR, "declare @constructor: pkg.C.new() : @MyAnnotation",
-                               "<pkg*A12.aj}A`declare \\@constructor");
+                               "<pkg*A12.aj'A`declare \\@constructor");
        }
 
        // what about 2 pieces of before advice with the same
@@ -169,8 +169,8 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
                                }
                        }
                }
-               String expected1 = "<pkg*A5.aj}A5&before";
-               String expected2 = "<pkg*A5.aj}A5&before!2";
+               String expected1 = "<pkg*A5.aj'A5&before";
+               String expected2 = "<pkg*A5.aj'A5&before!2";
                boolean b = expected1.equals(handle1);
                if (b) {
                        assertEquals("handleIdentifier - expected " + expected2 + ", but found " + handle2, expected2, handle2);
@@ -183,12 +183,12 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
        public void testDeclareWarningHandle() {
                runTest("declare warning handle");
                compareHandles(IProgramElement.Kind.DECLARE_WARNING, "declare warning: \"Illegal call.\"",
-                               "<pkg*A11.aj}A11`declare warning");
+                               "<pkg*A11.aj'A11`declare warning");
        }
 
        public void testTwoDeclareWarningHandles() {
                runTest("two declare warning handles");
-               compareHandles(IProgramElement.Kind.DECLARE_WARNING, "declare warning: \"blah\"", "<pkg*A11.aj}A11`declare warning!2");
+               compareHandles(IProgramElement.Kind.DECLARE_WARNING, "declare warning: \"blah\"", "<pkg*A11.aj'A11`declare warning!2");
        }
 
        // this is to ensure the logic for not including '1' in the count
@@ -197,9 +197,9 @@ public class JDTLikeHandleProviderTests extends XMLBasedAjcTestCase {
        public void testTenDeclareWarningHandles() {
                runTest("ten declare warning handles");
                compareHandles(IProgramElement.Kind.DECLARE_WARNING, "declare warning: \"warning 1\"",
-                               "<*DeclareWarnings.aj}DeclareWarnings`declare warning");
+                               "<*DeclareWarnings.aj'DeclareWarnings`declare warning");
                compareHandles(IProgramElement.Kind.DECLARE_WARNING, "declare warning: \"warning 10\"",
-                               "<*DeclareWarnings.aj}DeclareWarnings`declare warning!10");
+                               "<*DeclareWarnings.aj'DeclareWarnings`declare warning!10");
 
        }
 
index dfb8ca594fe71b033284d63623945e9759565403..72f29fe17dfdc9d4b798a8a57c6c9d7606f1edb9 100644 (file)
@@ -141,11 +141,12 @@ public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                IRelationshipMap irm = AsmManager.lastActiveStructureModel.getRelationshipMap();
                Set entries = irm.getEntries();
                boolean gotSomethingValid = false;
-               String expected = "<recursivepackage{RecursiveCatcher.java}RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
+               String expected = "<recursivepackage{RecursiveCatcher.java'RecursiveCatcher~recursiveCall~I?method-call(void recursivepackage.RecursiveCatcher.recursiveCall(int))";
                for (Iterator iterator = entries.iterator(); iterator.hasNext();) {
                        String str = (String) iterator.next();
-                       if (str.indexOf(expected) != -1)
+                       if (str.indexOf(expected) != -1) {
                                gotSomethingValid = true;
+                       }
                }
                if (!gotSomethingValid) {
                        fail("Did not find a relationship with the expected data in '" + expected + "'");
index 5ca583514375195b4990f507aa980a576c2168c3..04641aaaf1819ca82999b6c8ba9b23ee5555b093 100644 (file)
@@ -18,6 +18,12 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 
 public class Ajc1610Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
 
+       // Interesting new behaviour on AspectJ 1.6.9 - probably due to initial inner type changes.  
+       // Looks a real error (creating two annotations the same on a type is a bad thing)
+       //      public void testDuplicateAnnotations() {
+       //              runTest("duplicate annotation");
+       //      }
+
        public void testLoadingOldCode_319431() {
                runTest("loading old code");
        }
index b2dde3d5e8f6c191e1104cdaf8c725177ca34f4b..c51060775efc47477c4b51116232ea9dd85c49e2 100644 (file)
@@ -2,6 +2,11 @@
 
 <suite>
 
+  <ajc-test dir="bugs1610/prx" title="duplicate annotation">
+    <compile files="A.java" options="-1.5">
+    </compile>
+  </ajc-test>
+  
   <ajc-test dir="bugs1610/pr319431" title="loading old code">
     <compile files="Azpect2.java" inpath="builtWith168.jar" options="-1.5">
     </compile>
index 4f26f4f620b091b600a277ca33149559dc5df184..a57cd0c0263722403f52c0bce28bcec8b259a278 100644 (file)
@@ -127,31 +127,31 @@ public class Ajc163Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
                IProgramElement ipe = null;
                ipe = findElementAtLine(top.getRoot(), 4);// public java.util.List<String> Ship.i(List<String>[][] u)
-               assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[QList\\<QString;>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles)Ship.i)\\[\\[QList\\<QString;>;", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 7);// public java.util.List<String> Ship.i(Set<String>[][] u)
-               assertEquals("<{Handles.java}Handles)Ship.i)\\[\\[QSet\\<QString;>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles)Ship.i)\\[\\[QSet\\<QString;>;", ipe.getHandleIdentifier());
 
                // public java.util.Set<String> i(java.util.Set<String>[][] u)
                ipe = findElementAtLine(top.getRoot(), 10);
-               assertEquals("<{Handles.java}Handles~i~\\[\\[Qjava.util.Set\\<QString;>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles~i~\\[\\[Qjava.util.Set\\<QString;>;", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 13);// public java.util.Set<String> i(java.util.Set<String>[][] u,int i) {
-               assertEquals("<{Handles.java}Handles~i~\\[\\[Qjava.util.Set\\<QString;>;~I", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles~i~\\[\\[Qjava.util.Set\\<QString;>;~I", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 16);// public java.util.Set<String> i2(java.util.Set<? extends
-                                                                                                       // Collection<String>>[][] u) {
-               assertEquals("<{Handles.java}Handles~i2~\\[\\[Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier());
+               // Collection<String>>[][] u) {
+               assertEquals("<{Handles.java'Handles~i2~\\[\\[Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 19);// public java.util.Set<String> i3(java.util.Set<? extends
                // Collection<String[]>>[][] u)
-               assertEquals("<{Handles.java}Handles~i3~\\[\\[Qjava.util.Set\\<+QCollection\\<\\[QString;>;>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles~i3~\\[\\[Qjava.util.Set\\<+QCollection\\<\\[QString;>;>;", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 22);
-               assertEquals("<{Handles.java}Handles~i4~Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles~i4~Qjava.util.Set\\<+QCollection\\<QString;>;>;", ipe.getHandleIdentifier());
 
                ipe = findElementAtLine(top.getRoot(), 25);
-               assertEquals("<{Handles.java}Handles~i5~Qjava.util.Set\\<*>;", ipe.getHandleIdentifier());
+               assertEquals("<{Handles.java'Handles~i5~Qjava.util.Set\\<*>;", ipe.getHandleIdentifier());
 
        }
 
index 5a0f567b95ba37649ca5834a4c295f8216cce4ca..17ab5668099f295ee553f247e2fb2268209f3728 100644 (file)
@@ -88,11 +88,11 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                ipe = top.findElementForType("demo", "Orange");
                assertNotNull(ipe);
                assertEquals("<demo{Orange.java[Orange", ipe.getHandleIdentifier());
-               IRelationship ir = (IRelationship) model.getRelationshipMap().get(ipe).get(0);
-               String itdMethodHandle = (String) ir.getTargets().get(0);
+               IRelationship ir = model.getRelationshipMap().get(ipe).get(0);
+               String itdMethodHandle = ir.getTargets().get(0);
                // handle when all source: <{Aspect.java}Aspect)Orange.getColor
                // assertEquals("/binaries<{Aspect.java}Aspect)Orange.getColor", itdMethodHandle);
-               assertEquals("/binaries<(Aspect.class}Aspect)Orange.getColor", itdMethodHandle);
+               assertEquals("/binaries<(Aspect.class'Aspect)Orange.getColor", itdMethodHandle);
                IProgramElement itdpe = model.getHierarchy().findElementForHandle(itdMethodHandle);
                assertEquals("java.awt.Color", itdpe.getCorrespondingType(true));
 
@@ -102,11 +102,11 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                ipe = top.findElementForType("demo", "Strawberry");
                assertNotNull(ipe);
                assertEquals("<demo{Strawberry.java[Strawberry", ipe.getHandleIdentifier());
-               ir = (IRelationship) model.getRelationshipMap().get(ipe).get(0);
-               String itdFieldHandle = (String) ir.getTargets().get(0);
+               ir = model.getRelationshipMap().get(ipe).get(0);
+               String itdFieldHandle = ir.getTargets().get(0);
                // source handle <{Aspect.java}Aspect)Strawberry.color
                // assertEquals("/binaries<{Aspect.java}Aspect)Strawberry.color", itdFieldHandle);
-               assertEquals("/binaries<(Aspect.class}Aspect)Strawberry.color", itdFieldHandle);
+               assertEquals("/binaries<(Aspect.class'Aspect,Strawberry.color", itdFieldHandle);
                IProgramElement itdfpe = model.getHierarchy().findElementForHandle(itdMethodHandle);
                assertEquals("java.awt.Color", itdfpe.getCorrespondingType(true));
 
@@ -115,11 +115,11 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                ipe = top.findElementForType("demo", "Fruit");
                assertNotNull(ipe);
                assertEquals("<demo{Fruit.java[Fruit", ipe.getHandleIdentifier());
-               ir = (IRelationship) model.getRelationshipMap().get(ipe).get(0);
-               String itdCtorHandle = (String) ir.getTargets().get(0);
+               ir = model.getRelationshipMap().get(ipe).get(0);
+               String itdCtorHandle = ir.getTargets().get(0);
                // source handle <{Aspect.java}Aspect)Fruit.Fruit_new)QColor;)QString;
                // assertEquals("/binaries<{Aspect.java}Aspect)Fruit.Fruit_new)QColor;)QString;", itdCtorHandle);
-               assertEquals("/binaries<(Aspect.class}Aspect)Fruit.Fruit_new)QColor;)QString;", itdCtorHandle);
+               assertEquals("/binaries<(Aspect.class'Aspect)Fruit.Fruit_new)QColor;)QString;", itdCtorHandle);
                IProgramElement itdcpe = model.getHierarchy().findElementForHandle(itdCtorHandle);
                List ptypes = itdcpe.getParameterTypes();
                assertEquals("java.awt.Color", new String((char[]) ptypes.get(0)));
@@ -187,7 +187,7 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
                IProgramElement ipe = null;
                ipe = findElementAtLine(top.getRoot(), 13);
-               assertEquals("<p{HandleTestingAspect.java}HandleTestingAspect[InnerClass}InnerInnerAspect|1", ipe.getHandleIdentifier());
+               assertEquals("<p{HandleTestingAspect.java'HandleTestingAspect[InnerClass'InnerInnerAspect|1", ipe.getHandleIdentifier());
                // ipe = findElementAtLine(top.getRoot(), 29);
                // assertEquals("<x*OverrideOptions.aj}OverrideOptions&around!2",
                // ipe.getHandleIdentifier());
@@ -198,9 +198,9 @@ public class Ajc164Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                IHierarchy top = AsmManager.lastActiveStructureModel.getHierarchy();
                IProgramElement ipe = null;
                ipe = findElementAtLine(top.getRoot(), 22);
-               assertEquals("<x*OverrideOptions.aj}OverrideOptions&around", ipe.getHandleIdentifier());
+               assertEquals("<x*OverrideOptions.aj'OverrideOptions&around", ipe.getHandleIdentifier());
                ipe = findElementAtLine(top.getRoot(), 29);
-               assertEquals("<x*OverrideOptions.aj}OverrideOptions&around!2", ipe.getHandleIdentifier());
+               assertEquals("<x*OverrideOptions.aj'OverrideOptions&around!2", ipe.getHandleIdentifier());
        }
 
        // Only one of two aspects named
index fd7f57dd0f32f2bf5d9dfbfc5b1569321ef2dc6a..de419eab7e6fd30cc81891057fe26ab69cbcc874 100644 (file)
@@ -136,7 +136,7 @@ public class IntertypeTests extends org.aspectj.testing.XMLBasedAjcTestCase {
                pw.flush();
                String model = baos.toString();
                assertTrue(model.indexOf("<{Choice.java[Choice=[aspect declarations]") != -1);
-               assertTrue(model.indexOf("<{Choice.java}X[Keys=[declared on]") != -1);
+               assertTrue(model.indexOf("<{Choice.java'X[Keys=[declared on]") != -1);
        }
 
        public void testGenerics1() throws Exception {
index 7d8cb973d4ffe3903994ee6a280ce8e7c0cd5fe8..fe719f275551c7f09f43f277c06d3dce4dd9b46d 100644 (file)
@@ -271,7 +271,7 @@ public class IncrementalCompilationTests extends AbstractMultiProjectIncremental
                AspectJElementHierarchy model = (AspectJElementHierarchy) getModelFor(p).getHierarchy();
 
                IProgramElement ipe = model.findElementForHandleOrCreate(
-                               "=PR278496_4<foo{MyOtherClass.java[MyOtherClass[MyInnerClass}MyInnerInnerAspect", false);
+                               "=PR278496_4<foo{MyOtherClass.java[MyOtherClass[MyInnerClass'MyInnerInnerAspect", false);
                Assert.assertNotNull(ipe);
        }
 }
index ce598dfeb474b932e74531eda3cd503d81a1df71..5dcb5316fcc8f65b9d270b271e147fd10d7c2472 100644 (file)
@@ -172,10 +172,10 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p);
                printModel(p);
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               List rels = irm.get("=pr284771<test*AspectTrace.aj}AspectTrace&before");
+               List rels = irm.get("=pr284771<test*AspectTrace.aj'AspectTrace&before");
                assertNotNull(rels);
                assertEquals(2, ((Relationship) rels.get(0)).getTargets().size());
-               rels = irm.get("=pr284771<test*AspectTrace.aj}AspectTrace&before!2");
+               rels = irm.get("=pr284771<test*AspectTrace.aj'AspectTrace&before!2");
                assertNotNull(rels);
                assertEquals(2, ((Relationship) rels.get(0)).getTargets().size());
        }
@@ -220,34 +220,34 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p);
                printModel(p);
                IProgramElement decpPE = getModelFor(p).getHierarchy().findElementForHandle(
-                               "=pr286539<p.q.r{Aspect.java}Asp`declare parents");
+                               "=pr286539<p.q.r{Aspect.java'Asp`declare parents");
                assertNotNull(decpPE);
-               String s = (String) ((decpPE.getParentTypes()).get(0));
+               String s = ((decpPE.getParentTypes()).get(0));
                assertEquals("p.q.r.Int", s);
 
-               decpPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java}Asp`declare parents!2");
+               decpPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare parents!2");
                assertNotNull(decpPE);
-               s = (String) ((decpPE.getParentTypes()).get(0));
+               s = ((decpPE.getParentTypes()).get(0));
                assertEquals("p.q.r.Int", s);
 
                IProgramElement decaPE = getModelFor(p).getHierarchy().findElementForHandle(
-                               "=pr286539<p.q.r{Aspect.java}Asp`declare \\@type");
+                               "=pr286539<p.q.r{Aspect.java'Asp`declare \\@type");
                assertNotNull(decaPE);
                assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
 
-               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java}Asp`declare \\@type!2");
+               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@type!2");
                assertNotNull(decaPE);
                assertEquals("p.q.r.Goo", decaPE.getAnnotationType());
 
-               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java}Asp`declare \\@field");
+               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@field");
                assertNotNull(decaPE);
                assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
 
-               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java}Asp`declare \\@method");
+               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@method");
                assertNotNull(decaPE);
                assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
 
-               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java}Asp`declare \\@constructor");
+               decaPE = getModelFor(p).getHierarchy().findElementForHandle("=pr286539<p.q.r{Aspect.java'Asp`declare \\@constructor");
                assertNotNull(decaPE);
                assertEquals("p.q.r.Foo", decaPE.getAnnotationType());
        }
@@ -443,14 +443,14 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // Hid:5:(targets=1) =pr280380<g*AnAspect.aj}AnAspect)AClass.AClass_new (declared on) =pr280380<f{AClass.java[AClass
                // Hid:6:(targets=1) =pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx (declared on) =pr280380<f{AClass.java[AClass
                printModel(p);
-               assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx"));
+               assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj'AnAspect,AClass.xxxx"));
                alter(p, "inc2");
                build(p);
                assertNoErrors(p);
                printModel(p);
                // On this build the relationship should have changed to include the fully qualified target
                assertEquals(4, getModelFor(p).getRelationshipMap().getEntries().size());
-               assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx"));
+               assertNotNull(getModelFor(p).getRelationshipMap().get("=pr280380<g*AnAspect.aj'AnAspect,AClass.xxxx"));
                // Hid:1:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.xxxx
                // Hid:2:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.y
                // Hid:3:(targets=3) =pr280380<f{AClass.java[AClass (aspect declarations) =pr280380<g*AnAspect.aj}AnAspect)AClass.AClass_new
@@ -465,7 +465,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p);
                printModel(p);
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               List rels = irm.get("=pr280383<f{AnAspect.java}AnAspect)f.AClass.f_AClass_new");
+               List rels = irm.get("=pr280383<f{AnAspect.java'AnAspect)f.AClass.f_AClass_new");
                assertNotNull(rels);
        }
 
@@ -483,15 +483,15 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                String p = "pr283657";
                initialiseProject(p);
                build(p);
-               // printModel(p);
+               printModel(p);
                // Hid:1:(targets=1) =pr283657<{Aspect.java}Aspect)Target.foo (declared on) =pr283657<{Aspect.java[Target
                // Hid:2:(targets=1) =pr283657<{Aspect.java}Aspect)Target.foo!2 (declared on) =pr283657<{Aspect.java[Target
                // Hid:3:(targets=2) =pr283657<{Aspect.java[Target (aspect declarations) =pr283657<{Aspect.java}Aspect)Target.foo
                // Hid:4:(targets=2) =pr283657<{Aspect.java[Target (aspect declarations) =pr283657<{Aspect.java}Aspect)Target.foo!2
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               List rels = irm.get("=pr283657<{Aspect.java}Aspect)Target.foo");
+               List<IRelationship> rels = irm.get("=pr283657<{Aspect.java'Aspect,Target.foo");
                assertNotNull(rels);
-               rels = irm.get("=pr283657<{Aspect.java}Aspect)Target.foo!2");
+               rels = irm.get("=pr283657<{Aspect.java'Aspect)Target.foo!2");
                assertNotNull(rels);
        }
 
@@ -502,13 +502,13 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                addSourceFolderForSourceFile(p, getProjectRelativePath(p, "src/C.java"), "src");
                build(p);
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               IRelationship ir = (IRelationship) irm.get("=pr276399/src<*X.aj}X&after").get(0);
+               IRelationship ir = irm.get("=pr276399/src<*X.aj'X&after").get(0);
                assertNotNull(ir);
                alter(p, "inc1");
                build(p);
                printModel(p);
                irm = getModelFor(p).getRelationshipMap();
-               List rels = irm.get("=pr276399/src<*X.aj}X&after"); // should be gone after the inc build
+               List<IRelationship> rels = irm.get("=pr276399/src<*X.aj'X&after"); // should be gone after the inc build
                assertNull(rels);
        }
 
@@ -518,9 +518,9 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p);
                printModelAndRelationships(p);
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               List l = irm.get("=pr278255<{A.java}X`declare \\@type");
+               List<IRelationship> l = irm.get("=pr278255<{A.java'X`declare \\@type");
                assertNotNull(l);
-               IRelationship ir = (IRelationship) l.get(0);
+               IRelationship ir = l.get(0);
                assertNotNull(ir);
        }
 
@@ -733,11 +733,11 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // } catch (Exception e) {
                // }
                IRelationshipMap irm = getModelFor(cli).getRelationshipMap();
-               IRelationship ir = (IRelationship) irm.get("=pr265729_client<be.cronos.aop{App.java[App").get(0);
+               IRelationship ir = irm.get("=pr265729_client<be.cronos.aop{App.java[App").get(0);
                // This type should be affected by an ITD and a declare parents
                // could be either way round
-               String h1 = (String) ir.getTargets().get(0);
-               String h2 = (String) ir.getTargets().get(1);
+               String h1 = ir.getTargets().get(0);
+               String h2 = ir.getTargets().get(1);
 
                // For some ITD: public void I.g(String s) {}
                // Node in tree: I.g(java.lang.String) [inter-type method]
@@ -750,9 +750,9 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                }
                // ITD from the test program:
                // public String InterTypeAspectInterface.foo(int i,List list,App a) {
-               assertEquals("=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class}InterTypeAspect`declare parents", h1);
+               assertEquals("=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class'InterTypeAspect`declare parents", h1);
                assertEquals(
-                               "=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class}InterTypeAspect)InterTypeAspectInterface.foo)I)QList;)QSerializable;",
+                               "=pr265729_client/binaries<be.cronos.aop.aspects(InterTypeAspect.class'InterTypeAspect)InterTypeAspectInterface.foo)I)QList;)QSerializable;",
                                h2);
                IProgramElement binaryDecp = getModelFor(cli).getHierarchy().getElement(h1);
                assertNotNull(binaryDecp);
@@ -798,13 +798,13 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                String p = "decps";
                initialiseProject(p);
                build(p);
-               IProgramElement decp = getModelFor(p).getHierarchy().findElementForHandle("=decps<a{A.java}A`declare parents");
-               List ps = decp.getParentTypes();
+               IProgramElement decp = getModelFor(p).getHierarchy().findElementForHandle("=decps<a{A.java'A`declare parents");
+               List<String> ps = decp.getParentTypes();
                assertNotNull(ps);
                assertEquals(2, ps.size());
                int count = 0;
-               for (Iterator iterator = ps.iterator(); iterator.hasNext();) {
-                       String type = (String) iterator.next();
+               for (Iterator<String> iterator = ps.iterator(); iterator.hasNext();) {
+                       String type = iterator.next();
                        if (type.equals("java.io.Serializable")) {
                                count++;
                        }
@@ -820,7 +820,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                initialiseProject(p);
                build(p);
                IRelationshipMap irm = getModelFor(p).getRelationshipMap();
-               IRelationship ir = (IRelationship) irm.get("=261380<test{C.java}X&before").get(0);
+               IRelationship ir = irm.get("=261380<test{C.java'X&before").get(0);
                List targets = ir.getTargets();
                assertEquals(1, targets.size());
                System.out.println(targets.get(0));
@@ -963,29 +963,29 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                dumptree(model.getHierarchy().getRoot(), 0);
                IProgramElement root = model.getHierarchy().getRoot();
                ProgramElement theITD = (ProgramElement) findElementAtLine(root, 7);
-               Map m = theITD.kvpairs;
-               for (Iterator iterator = m.keySet().iterator(); iterator.hasNext();) {
-                       String type = (String) iterator.next();
+               Map<String, Object> m = theITD.kvpairs;
+               for (Iterator<String> iterator = m.keySet().iterator(); iterator.hasNext();) {
+                       String type = iterator.next();
                        System.out.println(type + " = " + m.get(type));
                }
                // return type of the ITD
                assertEquals("a.b.c.B", theITD.getCorrespondingType(true));
-               List ptypes = theITD.getParameterTypes();
-               for (Iterator iterator = ptypes.iterator(); iterator.hasNext();) {
-                       char[] object = (char[]) iterator.next();
+               List<char[]> ptypes = theITD.getParameterTypes();
+               for (Iterator<char[]> iterator = ptypes.iterator(); iterator.hasNext();) {
+                       char[] object = iterator.next();
                        System.out.println("p = " + new String(object));
                }
                ProgramElement decp = (ProgramElement) findElementAtLine(root, 8);
                m = decp.kvpairs;
-               for (Iterator iterator = m.keySet().iterator(); iterator.hasNext();) {
-                       String type = (String) iterator.next();
+               for (Iterator<String> iterator = m.keySet().iterator(); iterator.hasNext();) {
+                       String type = iterator.next();
                        System.out.println(type + " = " + m.get(type));
                }
-               List l = decp.getParentTypes();
-               assertEquals("java.io.Serializable", (String) l.get(0));
+               List<String> l = decp.getParentTypes();
+               assertEquals("java.io.Serializable", l.get(0));
                ProgramElement ctorDecp = (ProgramElement) findElementAtLine(root, 16);
                String ctordecphandle = ctorDecp.getHandleIdentifier();
-               assertEquals("=itdfq<a.b.c{A.java}XX)B.B_new)QString;", ctordecphandle); // 252702
+               assertEquals("=itdfq<a.b.c{A.java'XX)B.B_new)QString;", ctordecphandle); // 252702
                // ,
                // comment
                // 7
@@ -1003,11 +1003,11 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
 
                IProgramElement root = model.getHierarchy().getRoot();
                IProgramElement ipe = findElementAtLine(root, 4);
-               assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare warning", ipe.getHandleIdentifier());
+               assertEquals("=BrokenHandles<p{GetInfo.java'GetInfo`declare warning", ipe.getHandleIdentifier());
                ipe = findElementAtLine(root, 5);
-               assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare warning!2", ipe.getHandleIdentifier());
+               assertEquals("=BrokenHandles<p{GetInfo.java'GetInfo`declare warning!2", ipe.getHandleIdentifier());
                ipe = findElementAtLine(root, 6);
-               assertEquals("=BrokenHandles<p{GetInfo.java}GetInfo`declare parents!3", ipe.getHandleIdentifier());
+               assertEquals("=BrokenHandles<p{GetInfo.java'GetInfo`declare parents!3", ipe.getHandleIdentifier());
        }
 
        public void testNPEIncremental_pr262218() {
@@ -1165,7 +1165,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
 
                // Looking for 'package p.q'
                IProgramElement ipe = findElementAtLine(root, 1);
-               ipe = (IProgramElement) ipe.getChildren().get(0); // package decl is
+               ipe = ipe.getChildren().get(0); // package decl is
                // first entry in
                // the type
                System.out.println(ipe.getHandleIdentifier() + "  " + ipe.getKind());
@@ -1193,7 +1193,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // the advice relationship
                IProgramElement root = getModelFor(p).getHierarchy().getRoot();
                IProgramElement code = findElementAtLine(root, 5);
-               assertEquals("=pr253067<aa*AdvisesC.aj}AdvisesC)C.nothing?method-call(int aa.C.nothing())", code.getHandleIdentifier());
+               assertEquals("=pr253067<aa*AdvisesC.aj'AdvisesC)C.nothing?method-call(int aa.C.nothing())", code.getHandleIdentifier());
                // dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
                // Ajc.dumpAJDEStructureModel(getModelFor("pr253067"),
                // "after inc build where first advised line is gone");
@@ -1206,7 +1206,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                IProgramElement root = getModelFor(p).getHierarchy().getRoot();
                IProgramElement code = findElementAtLine(root, 4);
                // the @ should be escapified
-               assertEquals("=pr249216<{Deca.java}X`declare \\@type", code.getHandleIdentifier());
+               assertEquals("=pr249216<{Deca.java'X`declare \\@type", code.getHandleIdentifier());
                // dumptree(getModelFor(p).getHierarchy().getRoot(), 0);
                // Ajc.dumpAJDEStructureModel(getModelFor(p),
                // "after inc build where first advised line is gone");
@@ -1306,48 +1306,48 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p);
                IProgramElement root = getModelFor(p).getHierarchy().getRoot();
                IProgramElement typeDecl = findElementAtLine(root, 4);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles", typeDecl.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles", typeDecl.getHandleIdentifier());
 
                IProgramElement advice1 = findElementAtLine(root, 7);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before", advice1.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&before", advice1.getHandleIdentifier());
 
                IProgramElement advice2 = findElementAtLine(root, 11);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before!2", advice2.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&before!2", advice2.getHandleIdentifier());
 
                IProgramElement advice3 = findElementAtLine(root, 15);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before&I", advice3.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&before&I", advice3.getHandleIdentifier());
 
                IProgramElement advice4 = findElementAtLine(root, 20);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&before&I!2", advice4.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&before&I!2", advice4.getHandleIdentifier());
 
                IProgramElement advice5 = findElementAtLine(root, 25);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&after", advice5.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&after", advice5.getHandleIdentifier());
 
                IProgramElement advice6 = findElementAtLine(root, 30);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterReturning", advice6.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&afterReturning", advice6.getHandleIdentifier());
 
                IProgramElement advice7 = findElementAtLine(root, 35);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterThrowing", advice7.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&afterThrowing", advice7.getHandleIdentifier());
 
                IProgramElement advice8 = findElementAtLine(root, 40);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles&afterThrowing&I", advice8.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles&afterThrowing&I", advice8.getHandleIdentifier());
 
                IProgramElement namedInnerClass = findElementAtLine(root, 46);
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~x[NamedClass", namedInnerClass.getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~x[NamedClass", namedInnerClass.getHandleIdentifier());
 
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~foo[", findElementAtLine(root, 55).getHandleIdentifier());
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~foo[!2", findElementAtLine(root, 56).getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~foo[", findElementAtLine(root, 55).getHandleIdentifier());
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~foo[!2", findElementAtLine(root, 56).getHandleIdentifier());
 
                // From 247742: comment 3: two anon class declarations
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~b~QString;[", findElementAtLine(root, 62)
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~b~QString;[", findElementAtLine(root, 62)
                                .getHandleIdentifier());
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~b~QString;[!2", findElementAtLine(root, 63)
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~b~QString;[!2", findElementAtLine(root, 63)
                                .getHandleIdentifier());
 
                // From 247742: comment 6: two diff anon class declarations
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~c~QString;[", findElementAtLine(root, 66)
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~c~QString;[", findElementAtLine(root, 66)
                                .getHandleIdentifier());
-               assertEquals("=AdviceHandles/src<spacewar*Handles.aj}Handles~c~QString;[!2", findElementAtLine(root, 67)
+               assertEquals("=AdviceHandles/src<spacewar*Handles.aj'Handles~c~QString;[!2", findElementAtLine(root, 67)
                                .getHandleIdentifier());
 
                // // From 247742: comment 4
@@ -1543,8 +1543,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                getModelFor(bug2).dumprels(pw);
                pw.flush();
                IProgramElement root = getModelFor(bug2).getHierarchy().getRoot();
-               assertEquals("=AspectPathTwo/binaries<pkg(Asp.class}Asp&before", findElementAtLine(root, 5).getHandleIdentifier());
-               assertEquals("=AspectPathTwo/binaries<(Asp2.class}Asp2&before", findElementAtLine(root, 16).getHandleIdentifier());
+               assertEquals("=AspectPathTwo/binaries<pkg(Asp.class'Asp&before", findElementAtLine(root, 5).getHandleIdentifier());
+               assertEquals("=AspectPathTwo/binaries<(Asp2.class'Asp2&before", findElementAtLine(root, 16).getHandleIdentifier());
        }
 
        public void testAspectPath_pr274558() throws Exception {
@@ -1558,7 +1558,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(depending);
                printModel(depending);
                IProgramElement root = getModelFor(depending).getHierarchy().getRoot();
-               assertEquals("=bug274558base/binaries<r(DeclaresITD.class}DeclaresITD)InterfaceForITD.x", findElementAtLine(root, 4)
+               assertEquals("=bug274558base/binaries<r(DeclaresITD.class'DeclaresITD,InterfaceForITD.x", findElementAtLine(root, 4)
                                .getHandleIdentifier());
                // assertEquals("=AspectPathTwo/binaries<(Asp2.class}Asp2&before", findElementAtLine(root, 16).getHandleIdentifier());
        }
@@ -1579,9 +1579,9 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                IProgramElement root = getModelFor(bug2).getHierarchy().getRoot();
                IProgramElement binariesNode = getChild(root, "binaries");
                assertNotNull(binariesNode);
-               IProgramElement packageNode = (IProgramElement) binariesNode.getChildren().get(0);
+               IProgramElement packageNode = binariesNode.getChildren().get(0);
                assertEquals("a.b.c", packageNode.getName());
-               IProgramElement fileNode = (IProgramElement) packageNode.getChildren().get(0);
+               IProgramElement fileNode = packageNode.getChildren().get(0);
                assertEquals(IProgramElement.Kind.FILE, fileNode.getKind());
        }
 
@@ -1641,7 +1641,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertEquals("=pr269286<{Logger.java[Logger~aroo", findElementAtLine(root, 15).getHandleIdentifier()); // around
 
                // pointcuts are not fixed - seems to buggy handling of them internally
-               assertEquals("=pr269286<{Logger.java[Logger+ooo", findElementAtLine(root, 20).getHandleIdentifier());
+               assertEquals("=pr269286<{Logger.java[Logger\"ooo", findElementAtLine(root, 20).getHandleIdentifier());
 
                // DeclareWarning
                assertEquals("=pr269286<{Logger.java[Logger^message", findElementAtLine(root, 24).getHandleIdentifier());
@@ -1661,9 +1661,9 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // getModelFor(p).dumprels(pw);
                // pw.flush();
                IProgramElement ff = findFile(root, "ProcessAspect.aj");
-               assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj}ProcessAspect&after&QMyProcessor;", findElementAtLine(root, 22)
+               assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj'ProcessAspect&after&QMyProcessor;", findElementAtLine(root, 22)
                                .getHandleIdentifier());
-               assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj}ProcessAspect&after&QMyProcessor;!2", findElementAtLine(root, 68)
+               assertEquals("=prx<com.kronos.aspects*ProcessAspect.aj'ProcessAspect&after&QMyProcessor;!2", findElementAtLine(root, 68)
                                .getHandleIdentifier());
        }
 
@@ -2376,14 +2376,14 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // there should be one warning against "PR128618_2"
                List warnings = getWarningMessages("PR128618_2");
                assertTrue("Should be one warning, but there are #" + warnings.size(), warnings.size() == 1);
-               IMessage msg = (IMessage) (getWarningMessages("PR128618_2").get(0));
+               IMessage msg = (getWarningMessages("PR128618_2").get(0));
                assertEquals("warning should be against the FFDC.aj resource", "FFDC.aj", msg.getSourceLocation().getSourceFile().getName());
 
                alter("PR128618_2", "inc1");
                build("PR128618_2");
 
                checkWasntFullBuild();
-               IMessage msg2 = (IMessage) (getWarningMessages("PR128618_2").get(0));
+               IMessage msg2 = (getWarningMessages("PR128618_2").get(0));
                assertEquals("warning should be against the FFDC.aj resource", "FFDC.aj", msg2.getSourceLocation().getSourceFile()
                                .getName());
                assertFalse("a new warning message should have been generated", msg.equals(msg2));
@@ -2610,14 +2610,14 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertTrue("build should have compiled ok", getErrorMessages("PR113531").isEmpty());
                alter("PR113531", "inc1");
                build("PR113531");
-               assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", ((IMessage) getErrorMessages(
-                               "PR113531").get(0)).getMessage());
+               assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", (getErrorMessages("PR113531")
+                               .get(0)).getMessage());
                alter("PR113531", "inc2");
                build("PR113531");
                assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("PR113531"), getCompilerErrorMessages(
                                "PR113531").isEmpty());
-               assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", ((IMessage) getErrorMessages(
-                               "PR113531").get(0)).getMessage());
+               assertEquals("error message should be 'foo cannot be resolved' ", "foo cannot be resolved", (getErrorMessages("PR113531")
+                               .get(0)).getMessage());
        }
 
        // Stage 1: Compile the 4 files, pack.A2 extends pack.A1 (aspects) where
@@ -2752,8 +2752,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                assertTrue("There should be no exceptions handled:\n" + getCompilerErrorMessages("PR129613"), getCompilerErrorMessages(
                                "PR129613").isEmpty());
                assertEquals("warning message should be 'no match for this type name: File [Xlint:invalidAbsoluteTypeName]' ",
-                               "no match for this type name: File [Xlint:invalidAbsoluteTypeName]", ((IMessage) getWarningMessages("PR129613")
-                                               .get(0)).getMessage());
+                               "no match for this type name: File [Xlint:invalidAbsoluteTypeName]", (getWarningMessages("PR129613").get(0))
+                                               .getMessage());
        }
 
        // test for comment #0 - adding a comment to a class file shouldn't
@@ -3020,8 +3020,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
        public void testPr134541() {
                initialiseProject("PR134541");
                build("PR134541");
-               assertEquals("[Xlint:adviceDidNotMatch] should be associated with line 5", 5, ((IMessage) getWarningMessages("PR134541")
-                               .get(0)).getSourceLocation().getLine());
+               assertEquals("[Xlint:adviceDidNotMatch] should be associated with line 5", 5, (getWarningMessages("PR134541").get(0))
+                               .getSourceLocation().getLine());
                alter("PR134541", "inc1");
                build("PR134541");
                // if (getModelFor("PR134541").getHandleProvider().dependsOnLocation())
@@ -3030,8 +3030,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                // else
                checkWasntFullBuild(); // the line number has changed... but nothing
                // structural about the code
-               assertEquals("[Xlint:adviceDidNotMatch] should now be associated with line 7", 7,
-                               ((IMessage) getWarningMessages("PR134541").get(0)).getSourceLocation().getLine());
+               assertEquals("[Xlint:adviceDidNotMatch] should now be associated with line 7", 7, (getWarningMessages("PR134541").get(0))
+                               .getSourceLocation().getLine());
        }
 
        public void testJDTLikeHandleProviderWithLstFile_pr141730() {
@@ -3046,7 +3046,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build("JDTLikeHandleProvider");
                IHierarchy top = getModelFor("JDTLikeHandleProvider").getHierarchy();
                IProgramElement pe = top.findElementForType("pkg", "A");
-               String expectedHandle = "=JDTLikeHandleProvider<pkg*A.aj}A";
+               String expectedHandle = "=JDTLikeHandleProvider<pkg*A.aj'A";
                assertEquals("expected handle to be " + expectedHandle + ", but found " + pe.getHandleIdentifier(), expectedHandle, pe
                                .getHandleIdentifier());
                // } finally {
@@ -3396,8 +3396,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                checkWasFullBuild();
                String warningMessage = "can not build thisJoinPoint " + "lazily for this advice since it has no suitable guard "
                                + "[Xlint:noGuardForLazyTjp]";
-               assertEquals("warning message should be '" + warningMessage + "'", warningMessage, ((IMessage) getWarningMessages(
-                               "PR141556").get(0)).getMessage());
+               assertEquals("warning message should be '" + warningMessage + "'", warningMessage, (getWarningMessages("PR141556").get(0))
+                               .getMessage());
 
                // add a space to the Aspect but dont do a build
                alter("PR141556", "inc1");
@@ -3407,8 +3407,8 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build("PR141556");
                checkWasntFullBuild();
                assertTrue("there should still be a warning message ", !getWarningMessages("PR141556").isEmpty());
-               assertEquals("warning message should be '" + warningMessage + "'", warningMessage, ((IMessage) getWarningMessages(
-                               "PR141556").get(0)).getMessage());
+               assertEquals("warning message should be '" + warningMessage + "'", warningMessage, (getWarningMessages("PR141556").get(0))
+                               .getMessage());
        }
 
        public void testAdviceDidNotMatch_pr152589() {