|
|
@@ -27,6 +27,8 @@ import java.text.CharacterIterator; |
|
|
|
import java.text.StringCharacterIterator; |
|
|
|
import java.util.Locale; |
|
|
|
|
|
|
|
import org.apache.tools.ant.util.FileUtils; |
|
|
|
|
|
|
|
// CheckStyle:LineLengthCheck OFF - urls are long! |
|
|
|
/** |
|
|
|
* The Locator is a utility class which is used to find certain items |
|
|
@@ -401,11 +403,7 @@ public final class Locator { |
|
|
|
*/ |
|
|
|
public static URL fileToURL(File file) |
|
|
|
throws MalformedURLException { |
|
|
|
try { |
|
|
|
return new URL(encodeURI(file.toURL().toString())); |
|
|
|
} catch (UnsupportedEncodingException ex) { |
|
|
|
throw new MalformedURLException(ex.toString()); |
|
|
|
} |
|
|
|
return FileUtils.getFileUtils().getFileURL(file); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|