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/24 11:11:14 UTC
[8/8] ant git commit: make builtin native2ascii implementation the
default
make builtin native2ascii implementation the default
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/fd61c0af
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/fd61c0af
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/fd61c0af
Branch: refs/heads/master
Commit: fd61c0af5eea347daf0dfa070c4ff129636a3e7e
Parents: 5518577
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sun Jul 24 13:10:31 2016 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Jul 24 13:10:31 2016 +0200
----------------------------------------------------------------------
WHATSNEW | 3 +++
manual/Tasks/native2ascii.html | 9 ++++-----
.../native2ascii/Native2AsciiAdapterFactory.java | 13 +------------
3 files changed, 8 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/fd61c0af/WHATSNEW
----------------------------------------------------------------------
diff --git a/WHATSNEW b/WHATSNEW
index 3400159..e5cda6b 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -15,6 +15,9 @@ Changes that could break older environments:
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).
+
Fixed bugs:
-----------
http://git-wip-us.apache.org/repos/asf/ant/blob/fd61c0af/manual/Tasks/native2ascii.html
----------------------------------------------------------------------
diff --git a/manual/Tasks/native2ascii.html b/manual/Tasks/native2ascii.html
index ecc065a..1017714 100644
--- a/manual/Tasks/native2ascii.html
+++ b/manual/Tasks/native2ascii.html
@@ -62,13 +62,12 @@
<a name="implementationvalues">Here are the choices of the attribute</a>:</p>
<ul>
<li>default - the default converter for the platform - kaffee
- when run on Kaffee, builtin if JDK9 or newer is detected, sun
- otherwise.</li>
- <li>sun (the standard converter of the JDK < 9)</li>
+ when run on Kaffee, builtin otherwise.</li>
+ <li>sun (used to be the standard converter of the JDK < 9)</li>
<li>kaffe (the standard converter
of <a href="http://www.kaffe.org" target="_top">Kaffe</a>)</li>
- <li>builtin - Ant's internal implementation used for
- JDK9+. <em>since ant 1.9.8</em></li>
+ <li>builtin - Ant's internal implementation. <em>since ant
+ 1.9.8</em></li>
</ul>
<table border="1" cellpadding="2" cellspacing="0">
http://git-wip-us.apache.org/repos/asf/ant/blob/fd61c0af/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java b/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
index e8bd74d..74bb323 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
@@ -43,9 +43,6 @@ public class Native2AsciiAdapterFactory {
if (shouldUseKaffee()) {
return KaffeNative2Ascii.IMPLEMENTATION_NAME;
}
- if (shouldUseSun()) {
- return SunNative2Ascii.IMPLEMENTATION_NAME;
- }
return BuiltinNative2Ascii.IMPLEMENTATION_NAME;
}
@@ -85,8 +82,7 @@ public class Native2AsciiAdapterFactory {
if ((shouldUseKaffee() && choice == null)
|| KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
return new KaffeNative2Ascii();
- } else if ((shouldUseSun() && choice == null)
- || SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
+ } else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
return new SunNative2Ascii();
} else if (BuiltinNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
return new BuiltinNative2Ascii();
@@ -121,11 +117,4 @@ public class Native2AsciiAdapterFactory {
private static final boolean shouldUseKaffee() {
return JavaEnvUtils.isKaffe() || JavaEnvUtils.isClasspathBased();
}
-
- private static final boolean shouldUseSun() {
- return JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_5)
- || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_6)
- || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_7)
- || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_8);
- }
}