Browse Source

Updates for 1.9.0.RC4 - latest JDT

tags/V1_9_0_RC4
Andy Clement 6 years ago
parent
commit
4d12967458

+ 1
- 1
build/usedForMavenUpload_milestone/aspectjrt.pom View File

@@ -5,7 +5,7 @@
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<packaging>jar</packaging>
<version>1.9.0.BETA-7</version>
<version>1.9.0.RC4</version>
<name>AspectJ runtime</name>
<description>The runtime needed to execute a program using AspectJ</description>
<url>http://www.aspectj.org</url>

+ 1
- 1
build/usedForMavenUpload_milestone/aspectjtools.pom View File

@@ -5,7 +5,7 @@
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<packaging>jar</packaging>
<version>1.9.0.BETA-7</version>
<version>1.9.0.RC4</version>
<name>AspectJ tools</name>
<description>Tools from the AspectJ project</description>
<url>http://www.aspectj.org</url>

+ 1
- 1
build/usedForMavenUpload_milestone/aspectjweaver.pom View File

@@ -5,7 +5,7 @@
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<packaging>jar</packaging>
<version>1.9.0.BETA-7</version>
<version>1.9.0.RC4</version>
<name>AspectJ weaver</name>
<description>The AspectJ weaver introduces advices to java classes</description>
<url>http://www.aspectj.org</url>

+ 29
- 9
docs/dist/doc/README-190.html View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html> <head>
<title>AspectJ 1.9.0.RC3 Readme</title>
<title>AspectJ 1.9.0.RC4 Readme</title>
<style type="text/css">
<!--
P { margin-left: 20px; }
@@ -17,33 +17,53 @@
&copy; Copyright 2018 Contributors.
All rights reserved.
</small></div>
<h1>AspectJ 1.9.0.RC3 Readme</h1>
<p>The full list of resolved issues in 1.9.0 is available
<a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&f0=OP&f1=OP&f3=CP&f4=CP&j1=OR&list_id=16866879&product=AspectJ&query_format=advanced&target_milestone=1.9.0">here</a></h2>.</p>

<h1>AspectJ 1.9.0.RC4</h1>

<p>Primary changes in RC4 are to add support for &lt;compilerArg&gt; in the Ant task. This enables users of the Ant task to
pass in options supported by the underlying AspectJ but not yet surfaced elsewhere. Particularly useful with Java9 which includes
a number of module related commands. For example, here is an iajc usage with compilerArg that is passing <tt>--add-modules java.xml.bind</tt>:

<pre><code>
&lt;iajc destdir="bin" failonerror="true"
showWeaveInfo="true" source="1.9" target="1.9"
debug="true" fork="true" maxmem="256m"&gt;
&lt;compilerArg value="--add-modules"/&gt;
&lt;compilerArg value="java.xml.bind"/&gt;
&lt;src path="src" /&gt;
&lt;classpath&gt;
&lt;pathelement location="${aspectj.home}/lib/aspectjrt.jar"/&gt;
&lt;/classpath&gt;
&lt;/iajc&gt;
</code></pre>

<li>1.9.0.RC4 available 21-Feb-2018</li>

<h1>AspectJ 1.9.0.RC3</h1>

<p>Primary changes in RC3 are to upgrade JDT and pickup all the fixes for Java9 that have gone into it over the last few months.</p>

<li>1.9.0.RC3 available 5-Feb-2018</li>

<h1>AspectJ 1.9.0.RC2 Readme</h1>
<h1>AspectJ 1.9.0.RC2</h1>

<p>The full list of resolved issues in 1.9.0 is available
<a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&f0=OP&f1=OP&f3=CP&f4=CP&j1=OR&list_id=16866879&product=AspectJ&query_format=advanced&target_milestone=1.9.0">here</a></h2>.</p>

<ul>
<li>1.9.0.RC2 available 9-Nov-2017
</ul>

<h3>1.9.0.RC2 changes</h3>

<p>Key change in 1.9.0.RC2 is actually to be more tolerant of JDK10. The version handling has been somewhat overhauled so AspectJ 9 will
behave better on Java 10 and future JDKs. This should put AspectJ in a better place if new JDK versions are going
to arrive thick and fast.

<h1>AspectJ 1.9.0.RC1</h1>
<ul>

<li>1.9.0.RC1 available 20-Oct-2017
</ul>

<h3>1.9.0.RC1 changes</h3>

<p>This is the first release candidate of AspectJ 1.9.0 - the version of AspectJ to be based on Java9. It includes
a recent version of the Eclipse Java9 compiler (from jdt core, commit #062ac5d7a6bf9).</p>


+ 24
- 0
org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjcTestCase.java View File

@@ -691,6 +691,30 @@ public class AjcTestCase extends TestCase {
e.printStackTrace();
}
return lastRunResult;
} else if (vmargs!=null && (vmargs.contains("--add-modules") || vmargs.contains("--limit-modules") || vmargs.contains("--add-reads"))) {
// If --add-modules supplied, need to fork the test
try {
// if (mp.indexOf("$runtime") != -1) {
// mp = mp.replace(mp.indexOf("$runtime"),"$runtime".length(),TestUtil.aspectjrtPath().toString());
// }
if (cp.indexOf("aspectjrt")==-1) {
cp.append(File.pathSeparator).append(TestUtil.aspectjrtPath().getPath());
}
String command = LangUtil.getJavaExecutable().getAbsolutePath() + " " +vmargs+ (cp.length()==0?"":" -classpath " + cp) + " " + className ;
System.out.println("Command is "+command);
// Command is executed using ProcessBuilder to allow setting CWD for ajc sandbox compliance
ProcessBuilder pb = new ProcessBuilder(tokenizeCommand(command));
pb.directory( new File(ajc.getSandboxDirectory().getAbsolutePath()));
exec = pb.start();
BufferedReader stdInput = new BufferedReader(new InputStreamReader(exec.getInputStream()));
BufferedReader stdError = new BufferedReader(new InputStreamReader(exec.getErrorStream()));
exec.waitFor();
lastRunResult = createResultFromBufferReaders(command,stdInput, stdError);
} catch (Exception e) {
System.out.println("Error executing module test: " + e);
e.printStackTrace();
}
return lastRunResult;
} else {
cp.append(DEFAULT_CLASSPATH_ENTRIES);
URL[] urls = getURLs(cp.toString());

BIN
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip View File


BIN
org.eclipse.jdt.core/jdtcore-for-aspectj.jar View File


+ 11
- 0
tests/bugs190/modules/iii/Azpect.java View File

@@ -0,0 +1,11 @@
import javax.xml.transform.TransformerFactory;
import javax.xml.bind.JAXBContext;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
aspect Azpect {
before(JAXBContext x): execution(* m(JAXBContext)) && args(x) {
System.out.println(x);
}
}

+ 7
- 0
tests/bugs190/modules/iii/UsesJAXB.java View File

@@ -18,4 +18,11 @@ public class UsesJAXB {
JAXBContext context;
}
public void m(JAXBContext jc) {
}
public static void main(String[] argv) {
System.out.println("UsesJAXB.running...");
new UsesJAXB().m(null);
}
}

+ 0
- 4
tests/src/org/aspectj/systemtest/ajc190/Ajc190Tests.java View File

@@ -38,10 +38,6 @@ public class Ajc190Tests extends XMLBasedAjcTestCaseForJava9OrLater {
public void testWeaveModule() throws Exception {
runTest("weave module");
}
public void testUsesJaxb() {
runTest("java use of java.xml.bind");
}

// ---


+ 24
- 1
tests/src/org/aspectj/systemtest/ajc190/ModuleTests.java View File

@@ -21,6 +21,8 @@ import junit.framework.Test;
/**
* Building and weaving with modules in the picture.
*
* Module options from http://openjdk.java.net/jeps/261
*
* @author Andy Clement
*
*/
@@ -63,11 +65,32 @@ public class ModuleTests extends XMLBasedAjcTestCaseForJava9OrLater {
// runTest("module path vs classpath 2");
// }
// --add-modules
// This tests that when using --add-modules with one of the JDK modules (in the jmods subfolder of the JDK)
// that it can be found without needing to set --module-path (this seems to be implicitly included by javac too)
public void testAddModules1() {
runTest("java use of java.xml.bind");
runTest("compile use of java.xml.bind");
}
// This tests that we can use add-modules to pull in something from the JDK jmods package and that
// when subsequently weaving we can see types from those modules
public void testWovenAfterAddModules() {
runTest("weave use of java.xml.bind");
}
// --limit-modules
public void testLimitModules1() {
runTest("limit modules 1");
}

// --add-reads
public void testAddReads1() {
runTest("add reads 1");
}
// ---

/* For the specified class, check that each method has a stackmap attribute */
private void checkStackMapExistence(String classname, String toIgnore) throws ClassNotFoundException {

+ 36
- 1
tests/src/org/aspectj/systemtest/ajc190/ajc190.xml View File

@@ -118,10 +118,45 @@
-->
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="java use of java.xml.bind">
<ajc-test dir="bugs190/modules/iii" title="compile use of java.xml.bind">
<compile files="UsesJAXB.java" options="--add-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="weave use of java.xml.bind">
<compile files="UsesJAXB.java Azpect.java" options="--add-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="limit modules 1">
<compile files="UsesJAXB.java Azpect.java" options="--limit-modules java.xml.bind -1.9"/>
<run class="UsesJAXB" vmargs="--limit-modules java.xml.bind">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs190/modules/iii" title="add reads 1">
<compile files="UsesJAXB.java Azpect.java" options="--add-reads java.sql=java.xml.bind --add-modules java.sql -1.9"/>
<run class="UsesJAXB" vmargs="--add-modules java.xml.bind ">
<stdout>
<line text="UsesJAXB.running..."/>
<line text="null"/>
</stdout>
</run>
</ajc-test>
<!--
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" aspectpath="foo.jar"/>
<compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>

Loading…
Cancel
Save