Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@557220 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
7679c154cf
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      src/main/org/apache/tools/ant/Diagnostics.java

+ 6
- 2
src/main/org/apache/tools/ant/Diagnostics.java View File

@@ -49,6 +49,9 @@ import java.lang.reflect.InvocationTargetException;
*/
public final class Diagnostics {

/** the version number for java 1.5 returned from JavaEnvUtils */
private static final int JAVA_1_5_NUMBER = 15;

/**
* value for which a difference between clock and temp file time triggers
* a warning.
@@ -412,7 +415,8 @@ public final class Diagnostics {
Throwable error = null;
try {
Class which = Class.forName("org.apache.env.Which");
Method method = which.getMethod("main", new Class[] { String[].class });
Method method = which.getMethod(
"main", new Class[] {String[].class});
method.invoke(null, new Object[]{new String[]{}});
} catch (ClassNotFoundException e) {
out.println("Not available.");
@@ -609,7 +613,7 @@ public final class Diagnostics {
printProperty(out, ProxySetup.SOCKS_PROXY_USERNAME);
printProperty(out, ProxySetup.SOCKS_PROXY_PASSWORD);

if (JavaEnvUtils.getJavaVersionNumber() < 15) {
if (JavaEnvUtils.getJavaVersionNumber() < JAVA_1_5_NUMBER) {
return;
}
printProperty(out, ProxySetup.USE_SYSTEM_PROXIES);


Loading…
Cancel
Save