You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2016/07/25 10:26:47 UTC

[4/4] ant git commit: Merge branch '1.9.x'

Merge branch '1.9.x'


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/a6d07c62
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/a6d07c62
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/a6d07c62

Branch: refs/heads/master
Commit: a6d07c6247660f4eedab3c5952dc633c7b42be43
Parents: a10f57e 625d3d3
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon Jul 25 12:26:27 2016 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Mon Jul 25 12:26:27 2016 +0200

----------------------------------------------------------------------
 WHATSNEW                                        |  3 +
 build.xml                                       |  4 +-
 manual/Tasks/javac.html                         |  3 +-
 manual/properties.html                          |  6 +-
 .../org/apache/tools/ant/taskdefs/Javac.java    | 14 ++--
 .../compilers/CompilerAdapterFactory.java       |  3 +-
 .../compilers/DefaultCompilerAdapter.java       | 33 +++++---
 .../org/apache/tools/ant/util/JavaEnvUtils.java | 83 +++++++++++++-------
 src/tests/antunit/antunit-base.xml              |  4 +-
 src/tests/antunit/taskdefs/javac-test.xml       | 20 ++---
 .../taskdefs/optional/native2ascii-test.xml     |  4 +-
 .../compilers/DefaultCompilerAdapterTest.java   | 31 ++++++++
 .../apache/tools/ant/util/JavaEnvUtilsTest.java |  5 +-
 13 files changed, 138 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/WHATSNEW
----------------------------------------------------------------------
diff --cc WHATSNEW
index 0974de2,3e4e90b..d37e547
--- a/WHATSNEW
+++ b/WHATSNEW
@@@ -15,9 -9,9 +15,12 @@@ Changes that could break older environm
     same instance. This will now cause the build to fail.
     Bugzilla Report 59402
  
 + * <native2ascii> will default to the buitin implementation on Java8
 +   as well (sun isn't available for Java9+ anyway).
 +
+  * The ant.java.version property will now hold the value "9" rather
+    than "1.9" if running on Java 9.
+ 
  Fixed bugs:
  -----------
  

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index 02f6c9a,eba9fc8..9e8cc1f
--- a/build.xml
+++ b/build.xml
@@@ -373,9 -375,10 +373,7 @@@
        </not>
      </condition>
      <property name="ignoresystemclasses" value="false"/>
-     <condition property="jdk1.9+">
-       <contains string="${java.version}" substring="1.9."/>
-     </condition>
 -    <available property="jdk1.6+" classname="java.net.CookieStore"/>
 -    <available property="jdk1.7+" classname="java.nio.file.FileSystem"/>
 -    <available property="jdk1.8+" classname="java.lang.reflect.Executable"/>
+     <available property="jdk9+" classname="java.lang.module.ModuleDescriptor"/>
      <available property="kaffe" classname="kaffe.util.NotImplemented"/>
      <available property="harmony"
                 classname="org.apache.harmony.luni.util.Base64"/>

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/src/main/org/apache/tools/ant/taskdefs/Javac.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/src/tests/antunit/antunit-base.xml
----------------------------------------------------------------------
diff --cc src/tests/antunit/antunit-base.xml
index da39305,9863f3f..e8b3529
--- a/src/tests/antunit/antunit-base.xml
+++ b/src/tests/antunit/antunit-base.xml
@@@ -27,9 -27,11 +27,7 @@@
    <property name="test3.jar" location="${antunit.tmpdir}/test3.jar"/>
    <property name="test4.jar" location="${antunit.tmpdir}/test4.jar"/>
    <property name="test5.jar" location="${antunit.tmpdir}/test5.jar"/>
-   <condition property="jdk1.9+">
-     <contains string="${java.version}" substring="1.9."/>
-   </condition>
+   <available property="jdk9+" classname="java.lang.module.ModuleDescriptor"/>
 -  <available property="jdk1.8+" classname="java.lang.reflect.Executable"/>
 -  <available property="jdk1.7+" classname="java.nio.file.FileSystem"/>
 -  <available property="jdk1.6+" classname="java.net.CookieStore"/>
 -  <available property="jdk1.5+" classname="java.net.Proxy"/>
    <condition property="build.sysclasspath.only">
      <equals arg1="${build.sysclasspath}" arg2="only"/>
    </condition>

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/src/tests/antunit/taskdefs/javac-test.xml
----------------------------------------------------------------------
diff --cc src/tests/antunit/taskdefs/javac-test.xml
index 566c417,de193ea..a3ffc82
--- a/src/tests/antunit/taskdefs/javac-test.xml
+++ b/src/tests/antunit/taskdefs/javac-test.xml
@@@ -250,7 -271,35 +250,7 @@@ public class Adapter implements Compile
        <testJavac target="notValid"/>
      </au:expectfailure>
  
-     <sequential unless:set="jdk1.9+">
+     <sequential unless:set="jdk9+">
 -      <echo>JDK 1.4+</echo>
 -      <testJavac source="1.4" target="1.4"/>
 -      <delete dir="${javac-dir}/classes"/>
 -      <mkdir dir="${javac-dir}/classes"/>
 -    </sequential>
 -
 -    <sequential unless:set="jdk9+">
 -      <echo>JDK 1.5+</echo>
 -      <testJavac source="1.5" target="1.5"/>
 -      <delete dir="${javac-dir}/classes"/>
 -      <mkdir dir="${javac-dir}/classes"/>
 -    </sequential>
 -    
 -    <sequential if:set="jdk1.6+">
 -      <echo>JDK 1.6+</echo>
 -      <testJavac source="1.6" target="1.6"/>
 -      <delete dir="${javac-dir}/classes"/>
 -      <mkdir dir="${javac-dir}/classes"/>
 -    </sequential>
 -        
 -    <sequential if:set="jdk1.7+">
 -      <echo>JDK 1.7+</echo>
 -      <testJavac source="1.7" target="1.7"/>
 -      <delete dir="${javac-dir}/classes"/>
 -      <mkdir dir="${javac-dir}/classes"/>
 -    </sequential>
 -    
 -    <sequential if:set="jdk1.8+">
        <echo>JDK 1.8+</echo>
        <testJavac source="1.8" target="1.8"/>
        <delete dir="${javac-dir}/classes"/>

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/src/tests/junit/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapterTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ant/blob/a6d07c62/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
----------------------------------------------------------------------
diff --cc src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
index d153d63,aef4f1b..8bd229f
--- a/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
+++ b/src/tests/junit/org/apache/tools/ant/util/JavaEnvUtilsTest.java
@@@ -115,11 -115,12 +115,11 @@@ public class JavaEnvUtilsTest 
          assertTrue(j+" is normalized and in the JDK dir",
                     j.startsWith(javaHomeParent));
  
-         if (JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_1_9)) {
 -        if ((Os.isFamily("mac") && JavaEnvUtils.getJavaVersionNumber() <= JavaEnvUtils.VERSION_1_6)
 -            || JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9)) {
 -            assertTrue(j+" is normalized and in the JRE dir",
++        if (JavaEnvUtils.isAtLeastJavaVersion(JavaEnvUtils.JAVA_9)) {
 +            assertTrue(j + " is normalized and in the JRE dir",
                         j.startsWith(javaHome));
          } else {
 -            assertTrue(j+" is normalized and not in the JRE dir",
 +            assertTrue(j + " is normalized and not in the JRE dir",
                         !j.startsWith(javaHome));
          }