Author: antoine
Date: Wed Nov 23 12:53:49 2005
New Revision: 348558

URL: http://svn.apache.org/viewcvs?rev=348558&view=rev
Log:
make bootstrap on JDK 1.2

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java
URL: 
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java?rev=348558&r1=348557&r2=348558&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java Wed Nov 23 
12:53:49 2005
@@ -500,7 +500,15 @@
                         + " loader", Project.MSG_VERBOSE);
                     continue;
                 }
-                File libraryFile = new 
File(URLDecoder.decode(libraryURL.getFile()));
+                String decodedPath = null;
+                // try catch block required because URLDecoder.decode throws
+                // exception on JDK 1.2
+                try {
+                    decodedPath = URLDecoder.decode(libraryURL.getFile());
+                } catch (Exception exc) {
+                    throw new BuildException(exc);
+                }
+                File libraryFile = new File(decodedPath);
                 if (libraryFile.exists() && !isInPath(libraryFile)) {
                     addPathFile(libraryFile);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to