Browse Source

make builtin native2ascii implementation the default

master
Stefan Bodewig 9 years ago
parent
commit
fd61c0af5e
3 changed files with 8 additions and 17 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -5
      manual/Tasks/native2ascii.html
  3. +1
    -12
      src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java

+ 3
- 0
WHATSNEW View File

@@ -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:
-----------



+ 4
- 5
manual/Tasks/native2ascii.html View File

@@ -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">


+ 1
- 12
src/main/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java View File

@@ -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);
}
}

Loading…
Cancel
Save