Browse Source

fix for diagnostics using java 1.4

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@440335 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
a6e993b7aa
2 changed files with 9 additions and 5 deletions
  1. +1
    -0
      WHATSNEW
  2. +8
    -5
      src/main/org/apache/tools/ant/Diagnostics.java

+ 1
- 0
WHATSNEW View File

@@ -14,6 +14,7 @@ Fixed bugs:
Bugzilla report 40207.
* Macro element did not include top level Text. Bugzilla report 36803.
* AntClassLoader did not isolate resources when isolate was set. Bugzilla report 38747.
* Diagnostics broken when using java 1.4. Bugzilla report 40395.

Other changes:
--------------


+ 8
- 5
src/main/org/apache/tools/ant/Diagnostics.java View File

@@ -600,8 +600,12 @@ public final class Diagnostics {
printProperty(out, ProxySetup.SOCKS_PROXY_PORT);
printProperty(out, ProxySetup.SOCKS_PROXY_USERNAME);
printProperty(out, ProxySetup.SOCKS_PROXY_PASSWORD);
final String proxyDiagClassname="org.apache.tools.ant.util.java15.ProxyDiagnostics";

if (JavaEnvUtils.getJavaVersionNumber() < 15) {
return;
}
final String proxyDiagClassname
= "org.apache.tools.ant.util.java15.ProxyDiagnostics";
try {
Class proxyDiagClass = Class.forName(proxyDiagClassname);
Object instance =proxyDiagClass.newInstance();
@@ -611,12 +615,11 @@ public final class Diagnostics {
//not included, do nothing
} catch (IllegalAccessException e) {
//not included, do nothing

} catch (InstantiationException e) {
//not included, do nothing

} catch (NoClassDefFoundError e) {
// not included, to nothing
}

}

}

Loading…
Cancel
Save