diff options
20 files changed, 131 insertions, 10 deletions
diff --git a/lib/asm/asm-2.2.1.jar b/lib/asm/asm-2.2.1.jar Binary files differdeleted file mode 100644 index 297690f26..000000000 --- a/lib/asm/asm-2.2.1.jar +++ /dev/null diff --git a/lib/asm/asm-3.1.jar b/lib/asm/asm-3.1.jar Binary files differdeleted file mode 100644 index b3baf3feb..000000000 --- a/lib/asm/asm-3.1.jar +++ /dev/null diff --git a/lib/asm/asm-3.3.1.jar b/lib/asm/asm-3.3.1.jar Binary files differdeleted file mode 100644 index 349f0d42b..000000000 --- a/lib/asm/asm-3.3.1.jar +++ /dev/null diff --git a/lib/asm/asm-4.0.jar b/lib/asm/asm-4.0.jar Binary files differdeleted file mode 100644 index 6d63075eb..000000000 --- a/lib/asm/asm-4.0.jar +++ /dev/null diff --git a/lib/asm/asm-4.0.renamed.jar b/lib/asm/asm-4.0.renamed.jar Binary files differdeleted file mode 100644 index bb506ad1b..000000000 --- a/lib/asm/asm-4.0.renamed.jar +++ /dev/null diff --git a/lib/asm/asm-4.2.jar b/lib/asm/asm-4.2.jar Binary files differnew file mode 100644 index 000000000..693913dde --- /dev/null +++ b/lib/asm/asm-4.2.jar diff --git a/lib/asm/asm-4.2.renamed.jar b/lib/asm/asm-4.2.renamed.jar Binary files differnew file mode 100644 index 000000000..bf59c1535 --- /dev/null +++ b/lib/asm/asm-4.2.renamed.jar diff --git a/lib/asm/build.xml b/lib/asm/build.xml index ce3b4a7aa..192d81a2e 100644 --- a/lib/asm/build.xml +++ b/lib/asm/build.xml @@ -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 index 000000000..99c076dd3 --- /dev/null +++ b/lib/asm/readme.txt @@ -0,0 +1 @@ +asm 2.0 is used by some tests diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties index 5c9242094..1787eaec3 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties @@ -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 = diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java index e324e2571..ca9d5331c 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java @@ -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 index 000000000..7f33038d0 --- /dev/null +++ b/tests/bugs175/pr423257/AspectX.java @@ -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 index 000000000..5a32d6fa8 --- /dev/null +++ b/tests/bugs175/pr423257/Test.java @@ -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 diff --git a/tests/src/org/aspectj/systemtest/AllTests17.java b/tests/src/org/aspectj/systemtest/AllTests17.java index 5e46eba73..9feebfb1e 100644 --- a/tests/src/org/aspectj/systemtest/AllTests17.java +++ b/tests/src/org/aspectj/systemtest/AllTests17.java @@ -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 index 000000000..54b38a265 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc175/Ajc175Tests.java @@ -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 index 000000000..7be7c3bac --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc175/AllTestsAspectJ175.java @@ -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 index 000000000..dff61dd4a --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc175/ajc175.xml @@ -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> diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 7c1a4eae0..9a32b2f25 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -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"); diff --git a/weaver/.classpath b/weaver/.classpath index aeb0703e6..d169baefe 100644 --- a/weaver/.classpath +++ b/weaver/.classpath @@ -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> diff --git a/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java b/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java index 607aed1e2..02912d1d6 100644 --- a/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java +++ b/weaver/src/org/aspectj/weaver/bcel/asm/StackMapAdder.java @@ -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('.', '/'); } |