Repository: ant
Updated Branches:
  refs/heads/master 42810a6cb -> 26c8789a5


Locator can't use Fileutils

classes from ant-launcher.jar cannot load classes from ant.jar because
of the way we structure classloaders.

This reverts part of 66d7986


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/26c8789a
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/26c8789a
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/26c8789a

Branch: refs/heads/master
Commit: 26c8789a5067809255040d3338235b5ae25a3898
Parents: 42810a6
Author: Stefan Bodewig <bode...@apache.org>
Authored: Thu Apr 5 09:33:45 2018 +0200
Committer: Stefan Bodewig <bode...@apache.org>
Committed: Thu Apr 5 09:33:45 2018 +0200

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/launch/Locator.java | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/26c8789a/src/main/org/apache/tools/ant/launch/Locator.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/launch/Locator.java 
b/src/main/org/apache/tools/ant/launch/Locator.java
index aee91c8..dbc1e9d 100644
--- a/src/main/org/apache/tools/ant/launch/Locator.java
+++ b/src/main/org/apache/tools/ant/launch/Locator.java
@@ -17,8 +17,6 @@
  */
 package org.apache.tools.ant.launch;
 
-import org.apache.tools.ant.util.FileUtils;
-
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.UnsupportedEncodingException;
@@ -476,7 +474,6 @@ public final class Locator {
                                         final String... extensions)
             throws MalformedURLException {
         URL[] urls = new URL[0];
-        FileUtils utils = FileUtils.getFileUtils();
 
         if (!location.exists()) {
             return urls;
@@ -487,7 +484,7 @@ public final class Locator {
             String littlePath = path.toLowerCase(Locale.ENGLISH);
             for (String extension : extensions) {
                 if (littlePath.endsWith(extension)) {
-                    urls[0] = utils.getFileURL(location);
+                    urls[0] = fileToURL(location);
                     break;
                 }
             }
@@ -499,7 +496,7 @@ public final class Locator {
         });
         urls = new URL[matches.length];
         for (int i = 0; i < matches.length; ++i) {
-            urls[i] = utils.getFileURL(matches[i]);
+            urls[i] = fileToURL(matches[i]);
         }
         return urls;
     }

Reply via email to