ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r348558 - /ant/core/trunk/src/main/org/apache/tools/ant/AntClassLoader.java
Date Wed, 23 Nov 2005 20:55:16 GMT
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message