]> source.dussan.org Git - aspectj.git/commitdiff
Fix for 423257
authorAndy Clement <aclement@gopivotal.com>
Fri, 6 Dec 2013 18:33:48 +0000 (10:33 -0800)
committerAndy Clement <aclement@gopivotal.com>
Fri, 6 Dec 2013 18:33:48 +0000 (10:33 -0800)
20 files changed:
lib/asm/asm-2.2.1.jar [deleted file]
lib/asm/asm-3.1.jar [deleted file]
lib/asm/asm-3.3.1.jar [deleted file]
lib/asm/asm-4.0.jar [deleted file]
lib/asm/asm-4.0.renamed.jar [deleted file]
lib/asm/asm-4.2.jar [new file with mode: 0644]
lib/asm/asm-4.2.renamed.jar [new file with mode: 0644]
lib/asm/build.xml
lib/asm/readme.txt [new file with mode: 0644]
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
tests/bugs175/pr423257/AspectX.java [new file with mode: 0644]
tests/bugs175/pr423257/Test.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/AllTests17.java
tests/src/org/aspectj/systemtest/ajc175/Ajc175Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc175/AllTestsAspectJ175.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc175/ajc175.xml [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
weaver/.classpath
weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java

diff --git a/lib/asm/asm-2.2.1.jar b/lib/asm/asm-2.2.1.jar
deleted file mode 100644 (file)
index 297690f..0000000
Binary files a/lib/asm/asm-2.2.1.jar and /dev/null differ
diff --git a/lib/asm/asm-3.1.jar b/lib/asm/asm-3.1.jar
deleted file mode 100644 (file)
index b3baf3f..0000000
Binary files a/lib/asm/asm-3.1.jar and /dev/null differ
diff --git a/lib/asm/asm-3.3.1.jar b/lib/asm/asm-3.3.1.jar
deleted file mode 100644 (file)
index 349f0d4..0000000
Binary files a/lib/asm/asm-3.3.1.jar and /dev/null differ
diff --git a/lib/asm/asm-4.0.jar b/lib/asm/asm-4.0.jar
deleted file mode 100644 (file)
index 6d63075..0000000
Binary files a/lib/asm/asm-4.0.jar and /dev/null differ
diff --git a/lib/asm/asm-4.0.renamed.jar b/lib/asm/asm-4.0.renamed.jar
deleted file mode 100644 (file)
index bb506ad..0000000
Binary files a/lib/asm/asm-4.0.renamed.jar and /dev/null differ
diff --git a/lib/asm/asm-4.2.jar b/lib/asm/asm-4.2.jar
new file mode 100644 (file)
index 0000000..693913d
Binary files /dev/null and b/lib/asm/asm-4.2.jar differ
diff --git a/lib/asm/asm-4.2.renamed.jar b/lib/asm/asm-4.2.renamed.jar
new file mode 100644 (file)
index 0000000..bf59c15
Binary files /dev/null and b/lib/asm/asm-4.2.renamed.jar differ
index ce3b4a7aaa8a4b29bfded62377b645f171aae36d..192d81a2e7b7faaacf528c0792cbea17280c10a0 100644 (file)
@@ -3,9 +3,9 @@
        <!-- if you need this defining, use the jarjar-1.0.jar in this project -->
     <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"/>
 
-       <target name="package" description="Jarjar asm-4.0.jar and prefix package name with aj">
-               <jarjar destfile="asm-4.0.renamed.jar">
-                 <zipfileset src="asm-4.0.jar"/>
+       <target name="package" description="Jarjar asm-4.2.jar and prefix package name with aj">
+               <jarjar destfile="asm-4.2.renamed.jar">
+                 <zipfileset src="asm-4.2.jar"/>
                  <rule pattern="org.objectweb.asm.**" result="aj.org.objectweb.asm.@1"/>
                </jarjar>
        </target> 
diff --git a/lib/asm/readme.txt b/lib/asm/readme.txt
new file mode 100644 (file)
index 0000000..99c076d
--- /dev/null
@@ -0,0 +1 @@
+asm 2.0 is used by some tests
index 5c924209425dda0c560ca2147404bdb6a9a86e06..1787eaec3b5e35a688505700c362e5f8f82a66d4 100644 (file)
@@ -4,7 +4,7 @@
      The -Xlintfile:lint.properties allows fine-grained control. In tools.jar, see
      org/aspectj/weaver/XlintDefault.properties for the default behavior and a template to copy. 
 ### AspectJ-specific messages 
-compiler.name = AspectJ Compiler 1.7.3
+compiler.name = AspectJ Compiler 1.7.5
 compiler.version = Eclipse Compiler 0.B79_R37x, 3.7
 compiler.copyright = 
 
index e324e257116431b3cc9f9830b7f4c817ca8e0f80..ca9d5331c8c014df017d236195a80a60dfe302ae 100644 (file)
@@ -2204,7 +2204,7 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
                        ClassParser parser = new ClassParser(f.toString());
                        return world.buildBcelDelegate(referenceType, parser.parse(), true, false);
                } catch (IOException e) {
-                       IMessage msg = new Message("Failed to recover " + referenceType, referenceType.getSourceLocation(), false);
+                       IMessage msg = new Message("Failed to recover " + referenceType, referenceType.getDelegate()!=null?referenceType.getSourceLocation():null, false);
                        buildManager.handler.handleMessage(msg);
                }
                return null;
diff --git a/tests/bugs175/pr423257/AspectX.java b/tests/bugs175/pr423257/AspectX.java
new file mode 100644 (file)
index 0000000..7f33038
--- /dev/null
@@ -0,0 +1,11 @@
+package com.foo.bar;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class AspectX {
+    @Before("execution(* com.foo.bar.Test.foo())")
+    public void advice() {
+        System.out.println("Hello");
+    }
+}
diff --git a/tests/bugs175/pr423257/Test.java b/tests/bugs175/pr423257/Test.java
new file mode 100644 (file)
index 0000000..5a32d6f
--- /dev/null
@@ -0,0 +1,28 @@
+package com.foo.bar;
+
+public class Test {
+
+    abstract class X<T> {}
+
+    class X1 extends X<Integer> {}
+
+    class X2 extends X<String> {}
+
+    public Test foo() {
+        return this;
+    }
+
+    public <T> X<T> createMessage(int n) {
+        X x;
+        if (n == 0) {
+            x = new X1();
+        } else {
+            x = new X2();
+        }
+        return x;
+    }
+    
+    public static void main(String[] args) {
+               
+       }
+}
\ No newline at end of file
index 5e46eba737e76f80dd3a7c3c6989bf766f95ef29..9feebfb1e619b98dc5b6913f4ceec96334419950 100644 (file)
@@ -11,12 +11,14 @@ import org.aspectj.systemtest.ajc171.AllTestsAspectJ171;
 import org.aspectj.systemtest.ajc172.AllTestsAspectJ172;
 import org.aspectj.systemtest.ajc173.AllTestsAspectJ173;
 import org.aspectj.systemtest.ajc174.AllTestsAspectJ174;
+import org.aspectj.systemtest.ajc175.AllTestsAspectJ175;
 
 public class AllTests17 {
 
        public static Test suite() {
                TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.7");
                // $JUnit-BEGIN$
+               suite.addTest(AllTestsAspectJ175.suite()); 
                suite.addTest(AllTestsAspectJ174.suite()); 
                suite.addTest(AllTestsAspectJ173.suite()); 
                suite.addTest(AllTestsAspectJ172.suite());
diff --git a/tests/src/org/aspectj/systemtest/ajc175/Ajc175Tests.java b/tests/src/org/aspectj/systemtest/ajc175/Ajc175Tests.java
new file mode 100644 (file)
index 0000000..54b38a2
--- /dev/null
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc175;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * @author Andy Clement
+ */
+public class Ajc175Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+       
+       public void testVertxVerifyError_423257() throws Exception {
+               runTest("vertx verify error");
+       }
+       
+       // ---
+
+       public static Test suite() {
+               return XMLBasedAjcTestCase.loadSuite(Ajc175Tests.class);
+       }
+
+       @Override
+       protected File getSpecFile() {
+               return new File("../tests/src/org/aspectj/systemtest/ajc175/ajc175.xml");
+       }
+
+       public static void main(String[] args) {
+               
+       }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc175/AllTestsAspectJ175.java b/tests/src/org/aspectj/systemtest/ajc175/AllTestsAspectJ175.java
new file mode 100644 (file)
index 0000000..7be7c3b
--- /dev/null
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc175;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ175 {
+
+       public static Test suite() {
+               TestSuite suite = new TestSuite("AspectJ 1.7.5 tests");
+               // $JUnit-BEGIN$
+               suite.addTest(Ajc175Tests.suite());
+               // $JUnit-END$
+               return suite;
+       }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc175/ajc175.xml b/tests/src/org/aspectj/systemtest/ajc175/ajc175.xml
new file mode 100644 (file)
index 0000000..dff61dd
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+       <ajc-test dir="bugs175/pr423257" title="vertx verify error">
+               <compile files="Test.java AspectX.java" options="-1.7">
+               </compile>
+               <run class="com.foo.bar.Test">
+               </run>
+       </ajc-test>
+
+</suite>
index 7c1a4eae0530769bd699a6dc9fcb6cb6dd93c108..9a32b2f255a8bc776fc21d68881ea70d8440d9d7 100644 (file)
@@ -1048,7 +1048,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                alter(p, "inc1"); // Second source introduced C.java, defines C
                build(p);
                checkWasntFullBuild();
-               List msgs = getErrorMessages(p);
+               List<IMessage> msgs = getErrorMessages(p);
                assertEquals("error message should be 'The type C is already defined' ", "The type C is already defined",
                                ((IMessage) msgs.get(0)).getMessage());
                alter("PR148285_2", "inc2"); // type C in A.aj is commented out
@@ -1831,7 +1831,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
                build(p1); // Modify the aspect Asp2 to include staticinitialization()
                // advice
                checkWasFullBuild();
-               Set s = getModelFor(p1).getModelChangesOnLastBuild();
+               Set<File> s = getModelFor(p1).getModelChangesOnLastBuild();
                assertTrue("Should be empty as was full build:" + s, s.isEmpty());
 
                // prod the build of the second project with some extra info to tell it
@@ -3555,7 +3555,7 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
        public void testAdviceDidNotMatch_pr152589() {
                initialiseProject("PR152589");
                build("PR152589");
-               List warnings = getWarningMessages("PR152589");
+               List<IMessage> warnings = getWarningMessages("PR152589");
                assertTrue("There should be no warnings:\n" + warnings, warnings.isEmpty());
                alter("PR152589", "inc1");
                build("PR152589");
index aeb0703e6a3fef1e7a45e7c2115e2da59eee2a58..d169baefed3ba9626793d1ea1f0167695fc2fa5f 100644 (file)
@@ -13,6 +13,6 @@
        <classpathentry kind="lib" path="/lib/bcel/bcel.jar" sourcepath="/lib/bcel/bcel-src.zip"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry combineaccessrules="false" kind="src" path="/org.aspectj.matcher"/>
-       <classpathentry kind="lib" path="/lib/asm/asm-4.0.renamed.jar"/>
+       <classpathentry kind="lib" path="/lib/asm/asm-4.2.renamed.jar"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
index 607aed1e23eb6b20b4421007640139841fee6156..02912d1d60d8a6447a0f8dd72d4485c939a159b8 100644 (file)
@@ -96,7 +96,7 @@ public class StackMapAdder {
                                return "java/lang/Object";
                        } else {
                                do {
-                                       resolvedType1 = resolvedType1.getSuperclass();
+                                       resolvedType1 = resolvedType1.getSuperclass().getRawType();
                                } while (!resolvedType1.isAssignableFrom(resolvedType2));
                                return resolvedType1.getRawName().replace('.', '/');
                        }