ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r948667 - in /ant/core/trunk/src/main/org/apache/tools/ant: Diagnostics.java Main.java
Date Thu, 27 May 2010 04:33:36 GMT
Author: bodewig
Date: Thu May 27 04:33:36 2010
New Revision: 948667

URL: http://svn.apache.org/viewvc?rev=948667&view=rev
Log:
drop version check now that ant-nodeps.jar has been removed

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java
    ant/core/trunk/src/main/org/apache/tools/ant/Main.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?rev=948667&r1=948666&r2=948667&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Diagnostics.java Thu May 27 04:33:36 2010
@@ -72,7 +72,6 @@ public final class Diagnostics {
     private static final int SECONDS_PER_MILLISECOND = 1000;
     private static final int SECONDS_PER_MINUTE = 60;
     private static final int MINUTES_PER_HOUR = 60;
-    private static final String TEST_CLASS = "org.apache.tools.ant.taskdefs.optional.EchoProperties";
 
     /**
      * The error text when a security manager blocks access to a property.
@@ -87,42 +86,19 @@ public final class Diagnostics {
     }
 
     /**
-     * Check if optional tasks are available. Not that it does not check
-     * for implementation version. Use <tt>validateVersion()</tt> for this.
-     * @return <tt>true</tt> if optional tasks are available.
+     * Doesn't do anything.
+     * @deprecated Obsolete since Ant 1.8.2
+     * @return <tt>true</tt>
      */
     public static boolean isOptionalAvailable() {
-        try {
-            Class.forName(TEST_CLASS);
-        } catch (ClassNotFoundException e) {
-            return false;
-        }
         return true;
     }
 
     /**
-     * Check if core and optional implementation version do match.
-     * @throws BuildException if the implementation version of optional tasks
-     * does not match the core implementation version.
+     * Doesn't do anything.
+     * @deprecated Obsolete since Ant 1.8.2
      */
     public static void validateVersion() throws BuildException {
-        try {
-            Class optional = Class.forName(TEST_CLASS);
-            String coreVersion = getImplementationVersion(Main.class);
-            String optionalVersion = getImplementationVersion(optional);
-
-            if (coreVersion != null && !coreVersion.equals(optionalVersion)) {
-                throw new BuildException("Invalid implementation version "
-                        + "between Ant core and Ant optional tasks.\n"
-                        + " core    : " + coreVersion + " in "
-                        + getClassLocation(Main.class)
-                        + "\n" + " optional: " + optionalVersion + " in "
-                        + getClassLocation(optional));
-            }
-        } catch (ClassNotFoundException e) {
-            // ignore
-            ignoreThrowable(e);
-        }
     }
 
     /**
@@ -332,16 +308,6 @@ public final class Diagnostics {
         out.println("core tasks     : " + getImplementationVersion(Main.class)
                     + " in " + getClassLocation(Main.class));
 
-        Class optional = null;
-        try {
-            optional = Class.forName(TEST_CLASS);
-            out.println("optional tasks : " + getImplementationVersion(optional)
-                        + " in " + getClassLocation(optional));
-        } catch (ClassNotFoundException e) {
-            ignoreThrowable(e);
-            out.println("optional tasks : not available");
-        }
-
         header(out, "ANT PROPERTIES");
         doReportAntProperties(out);
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/Main.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Main.java?rev=948667&r1=948666&r2=948667&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/Main.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/Main.java Thu May 27 04:33:36 2010
@@ -193,7 +193,6 @@ public class Main implements AntMain {
                          ClassLoader coreLoader) {
 
         try {
-            Diagnostics.validateVersion();
             processArgs(args);
         } catch (Throwable exc) {
             handleLogfile();



Mime
View raw message