<!-- 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>
--- /dev/null
+asm 2.0 is used by some tests
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 =
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;
--- /dev/null
+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");
+ }
+}
--- /dev/null
+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
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());
--- /dev/null
+/*******************************************************************************
+ * 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) {
+
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * 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;
+ }
+}
--- /dev/null
+<!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>
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
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
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");
<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>
return "java/lang/Object";
} else {
do {
- resolvedType1 = resolvedType1.getSuperclass();
+ resolvedType1 = resolvedType1.getSuperclass().getRawType();
} while (!resolvedType1.isAssignableFrom(resolvedType2));
return resolvedType1.getRawName().replace('.', '/');
}