Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 16067 invoked from network); 18 Jul 2007 10:47:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2007 10:47:27 -0000 Received: (qmail 28721 invoked by uid 500); 18 Jul 2007 10:47:17 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 28691 invoked by uid 500); 18 Jul 2007 10:47:17 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 28673 invoked by uid 500); 18 Jul 2007 10:47:17 -0000 Received: (qmail 28666 invoked by uid 99); 18 Jul 2007 10:47:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 03:47:17 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2007 03:47:14 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id C7DC31A981A; Wed, 18 Jul 2007 03:46:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r557220 - /ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java Date: Wed, 18 Jul 2007 10:46:54 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070718104654.C7DC31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: peterreilly Date: Wed Jul 18 03:46:50 2007 New Revision: 557220 URL: http://svn.apache.org/viewvc?view=rev&rev=557220 Log: checkstyle Modified: ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java?view=diff&rev=557220&r1=557219&r2=557220 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java Wed Jul 18 03:46:50 2007 @@ -49,6 +49,9 @@ */ 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 @@ 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 @@ 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); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org