summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement2018-04-20 12:45:31 -0400
committerAndy Clement2018-04-20 12:45:31 -0400
commit3876a7dfcc371e3be43276c58bb792a09ed23c40 (patch)
treed29e000aaa7ee58a7575ab4c02331b35dd955273
parent836beab108ef4be8b59c1ad9c8596ce959bdf1c7 (diff)
downloadorg.aspectj-3876a7dfcc371e3be43276c58bb792a09ed23c40.tar.gz
org.aspectj-3876a7dfcc371e3be43276c58bb792a09ed23c40.tar.xz
org.aspectj-3876a7dfcc371e3be43276c58bb792a09ed23c40.zip
Working towards 1.9.1V1_9_1
-rw-r--r--docs/dist/doc/README-191.html52
-rw-r--r--docs/dist/doc/index.html1
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties4
-rw-r--r--tests/src/org/aspectj/systemtest/AllTests19.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc191/SanityTestsJava10.java98
-rw-r--r--tests/src/org/aspectj/systemtest/ajc191/ajc191.xml2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc191/sanity-tests-10.xml70
8 files changed, 227 insertions, 3 deletions
diff --git a/docs/dist/doc/README-191.html b/docs/dist/doc/README-191.html
new file mode 100644
index 000000000..4c891d208
--- /dev/null
+++ b/docs/dist/doc/README-191.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html> <head>
+<title>AspectJ 1.9.1 Readme</title>
+<style type="text/css">
+<!--
+ P { margin-left: 20px; }
+ PRE { margin-left: 20px; }
+ LI { margin-left: 20px; }
+ H4 { margin-left: 20px; }
+ H3 { margin-left: 10px; }
+-->
+</style>
+</head>
+
+<body>
+<div align="right"><small>
+&copy; Copyright 2018 Contributors.
+All rights reserved.
+</small></div>
+<p>The full list of resolved issues in 1.9.1 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.1">here</a></h2>.</p>
+
+<h1>AspectJ 1.9.1</h1>
+
+<h4>Java 10 support</h4>
+<p>AspectJ has updated to a recent JDT compiler version (commit <tt>#abe06abe4ce1</tt> - 9-Apr-2018). With this update it
+now supports Java10. This means you can use the 'var' support. A simple example of combining var with
+an aspect:</p>
+<p>
+<pre><code>
+public class Code3 {
+ public static void main(String []argv) {
+ var x = "hello";
+ System.out.println(x.getClass());
+ }
+}
+
+aspect X {
+ before(): call(* *.getClass()) && target(String) {
+ System.out.println(thisJoinPointStaticPart);
+ }
+}
+</code></pre>
+</p>
+<p>Available: 1.9.1 available 20-Apr-2018</p>
+
+<br><br>
+
+
+<!-- ============================== -->
+</body>
+</html>
diff --git a/docs/dist/doc/index.html b/docs/dist/doc/index.html
index b06c50bc4..9e556ba73 100644
--- a/docs/dist/doc/index.html
+++ b/docs/dist/doc/index.html
@@ -138,6 +138,7 @@
<tr> <td>README's
</td>
<td>Changes and porting guide for AspectJ
+ <a href="README-191.html">1.9.1</a>,
<a href="README-190.html">1.9.0</a>,
<a href="README-1811.html">1.8.10</a>,
<a href="README-1810.html">1.8.10</a>,
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 4aa9defc4..516af38f6 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,8 +4,8 @@
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.9.0
-compiler.version = Eclipse Compiler #1bfc7b4202e874c(Feb2018), 3.14
+compiler.name = AspectJ Compiler 1.9.1
+compiler.version = Eclipse Compiler #abe06abe4ce1(Apr2018), 3.14
compiler.copyright =
diff --git a/tests/src/org/aspectj/systemtest/AllTests19.java b/tests/src/org/aspectj/systemtest/AllTests19.java
index 4835a6154..8cb86d449 100644
--- a/tests/src/org/aspectj/systemtest/AllTests19.java
+++ b/tests/src/org/aspectj/systemtest/AllTests19.java
@@ -11,6 +11,7 @@
package org.aspectj.systemtest;
import org.aspectj.systemtest.ajc190.AllTestsAspectJ190;
+import org.aspectj.systemtest.ajc191.AllTestsAspectJ191;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -21,6 +22,7 @@ public class AllTests19 {
TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.9");
// $JUnit-BEGIN$
suite.addTest(AllTestsAspectJ190.suite());
+ suite.addTest(AllTestsAspectJ191.suite());
suite.addTest(AllTests18.suite());
// $JUnit-END$
return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java b/tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java
index a42ad5b4c..8588b845b 100644
--- a/tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java
+++ b/tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java
@@ -19,6 +19,7 @@ public class AllTestsAspectJ191 {
TestSuite suite = new TestSuite("AspectJ 1.9.1 tests");
// $JUnit-BEGIN$
suite.addTest(Ajc191Tests.suite());
+ suite.addTest(SanityTestsJava10.suite());
// $JUnit-END$
return suite;
}
diff --git a/tests/src/org/aspectj/systemtest/ajc191/SanityTestsJava10.java b/tests/src/org/aspectj/systemtest/ajc191/SanityTestsJava10.java
new file mode 100644
index 000000000..f4b8f3698
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc191/SanityTestsJava10.java
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2081 IBM and 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
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc191;
+
+import java.io.File;
+
+import org.aspectj.apache.bcel.classfile.JavaClass;
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+import junit.framework.Test;
+
+/*
+ * Some very trivial tests that help verify things are OK.
+ * These are a copy of the earlier Sanity Tests created for 1.6 but these supply the -10 option
+ * to check code generation and modification with that version specified.
+ *
+ * @author Andy Clement
+ */
+public class SanityTestsJava10 extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ // Incredibly trivial test programs that check the compiler works at all (these are easy-ish to debug)
+ public void testSimpleJava_A() {
+ runTest("simple - a");
+ }
+
+ public void testSimpleJava_B() {
+ runTest("simple - b");
+ }
+
+ public void testSimpleCode_C() {
+ runTest("simple - c");
+ }
+
+ public void testSimpleCode_D() {
+ runTest("simple - d");
+ }
+
+ public void testSimpleCode_E() {
+ runTest("simple - e");
+ }
+
+ public void testSimpleCode_F() {
+ runTest("simple - f");
+ }
+
+ public void testSimpleCode_G() {
+ runTest("simple - g");
+ }
+
+ public void testSimpleCode_H() {
+ runTest("simple - h", true);
+ }
+
+ public void testSimpleCode_I() {
+ runTest("simple - i");
+ }
+
+ public void testVersionCorrect1() throws ClassNotFoundException {
+ runTest("simple - j");
+ checkVersion("A", 54, 0);
+ }
+
+ public void testVersionCorrect2() throws ClassNotFoundException {
+ runTest("simple - k");
+ checkVersion("A", 54, 0);
+ }
+
+ public void testVersionCorrect4() throws ClassNotFoundException { // check it is 49.0 when -1.5 is specified
+ runTest("simple - m");
+ checkVersion("A", 49, 0);
+ }
+
+ private void checkVersion(String classname, int major, int minor) throws ClassNotFoundException {
+ JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), classname);
+ if (jc.getMajor() != major) {
+ fail("Expected major version to be " + major + " but was " + jc.getMajor());
+ }
+ if (jc.getMinor() != minor) {
+ fail("Expected minor version to be " + minor + " but was " + jc.getMinor());
+ }
+ }
+
+ // ///////////////////////////////////////
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(SanityTestsJava10.class);
+ }
+
+ @Override
+ protected File getSpecFile() {
+ return getClassResource("sanity-tests-10.xml");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc191/ajc191.xml b/tests/src/org/aspectj/systemtest/ajc191/ajc191.xml
index ab14b9e73..3a87375e9 100644
--- a/tests/src/org/aspectj/systemtest/ajc191/ajc191.xml
+++ b/tests/src/org/aspectj/systemtest/ajc191/ajc191.xml
@@ -28,7 +28,7 @@
<run class="Code3">
<stdout>
<line text="call(Class java.lang.Object.getClass())"/>
- <line text="class java.util.ArrayList"/>
+ <line text="class java.lang.String"/>
</stdout>
</run>
</ajc-test>
diff --git a/tests/src/org/aspectj/systemtest/ajc191/sanity-tests-10.xml b/tests/src/org/aspectj/systemtest/ajc191/sanity-tests-10.xml
new file mode 100644
index 000000000..a6bdbd938
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc191/sanity-tests-10.xml
@@ -0,0 +1,70 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- AspectJ v1.6.0 Tests -->
+<suite>
+
+ <!-- empty class -->
+ <ajc-test dir="bugs160/simplejava" title="simple - a">
+ <compile files="SimpleA.java" options="-10"/>
+ </ajc-test>
+
+ <!-- class with one method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - b">
+ <compile files="SimpleB.java" options="-10"/>
+ <run class="SimpleB"/>
+ </ajc-test>
+
+ <!-- empty aspect -->
+ <ajc-test dir="bugs160/simplejava" title="simple - c">
+ <compile files="SimpleC.java" options="-10"/>
+ </ajc-test>
+
+ <!-- simple before -->
+ <ajc-test dir="bugs160/simplejava" title="simple - d">
+ <compile files="SimpleD.java" options="-10"/>
+ </ajc-test>
+
+ <!-- simple itd field -->
+ <ajc-test dir="bugs160/simplejava" title="simple - e">
+ <compile files="SimpleE.java" options="-10"/>
+ </ajc-test>
+
+ <!-- aspect with main calling a static method -->
+ <ajc-test dir="bugs160/simplejava" title="simple - f">
+ <compile files="SimpleF.java" options="-10"/>
+ </ajc-test>
+
+ <!-- pertarget -->
+ <ajc-test dir="bugs160/simplejava" title="simple - g">
+ <compile files="SimpleG.java" options="-10"/>
+ </ajc-test>
+
+ <!-- generic ctor itds -->
+ <ajc-test dir="bugs160/simplejava" title="simple - h">
+ <compile files="SimpleH.java" options="-10"/>
+ </ajc-test>
+
+ <!-- overriding generic itd methods -->
+ <ajc-test dir="bugs160/simplejava" title="simple - i">
+ <compile files="SimpleI.java" options="-10"/>
+ </ajc-test>
+
+ <!-- check class file version is 54.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - j">
+ <compile files="SimpleJ.java" options="-10"/>
+ </ajc-test>
+
+ <!-- check class file version is 54.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - k">
+ <compile files="SimpleJ.java" options="-source 10"/>
+ </ajc-test>
+
+ <!-- check class file version is 49.0 -->
+ <ajc-test dir="bugs160/simplejava" title="simple - m">
+ <compile files="SimpleJ.java" options="-1.5"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/simplejava" title="simple - n">
+ <compile files="SimpleN.java" options="-10"/>
+ </ajc-test>
+</suite>