]> source.dussan.org Git - aspectj.git/commitdiff
Working towards 1.9.1 V1_9_1
authorAndy Clement <aclement@pivotal.io>
Fri, 20 Apr 2018 16:45:31 +0000 (09:45 -0700)
committerAndy Clement <aclement@pivotal.io>
Fri, 20 Apr 2018 16:45:31 +0000 (09:45 -0700)
docs/dist/doc/README-191.html [new file with mode: 0644]
docs/dist/doc/index.html
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/messages.properties
tests/src/org/aspectj/systemtest/AllTests19.java
tests/src/org/aspectj/systemtest/ajc191/AllTestsAspectJ191.java
tests/src/org/aspectj/systemtest/ajc191/SanityTestsJava10.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc191/ajc191.xml
tests/src/org/aspectj/systemtest/ajc191/sanity-tests-10.xml [new file with mode: 0644]

diff --git a/docs/dist/doc/README-191.html b/docs/dist/doc/README-191.html
new file mode 100644 (file)
index 0000000..4c891d2
--- /dev/null
@@ -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>
index b06c50bc4612741cfaedbd832523a6c063045b6c..9e556ba73156ecdde881d7989cbaea210c162bf3 100644 (file)
 <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>,
index 4aa9defc4fe849373e990c995f3edacb2b8ce76e..516af38f6071345001c0fe1e0176f482a0136c29 100644 (file)
@@ -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 = 
 
 
index 4835a6154fe62c8d7eeb45a8f1076b45d999078a..8cb86d4497972dbaf961907fa59579dabb70f11e 100644 (file)
@@ -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;
index a42ad5b4ca8b95277f189fe1e48c87ea3c7f764d..8588b845b5e533132db3e8caa422ab2ebd842c35 100644 (file)
@@ -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 (file)
index 0000000..f4b8f36
--- /dev/null
@@ -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");
+       }
+
+}
index ab14b9e7360b27720a1f01b56af11ff839a3ced8..3a87375e93b29e740ab1f49eed68b3666aaa6eef 100644 (file)
@@ -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 (file)
index 0000000..a6bdbd9
--- /dev/null
@@ -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>