diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/src/org/aspectj/util/FileUtil.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java index 8745750c5..2d2a90e0e 100644 --- a/util/src/org/aspectj/util/FileUtil.java +++ b/util/src/org/aspectj/util/FileUtil.java @@ -879,7 +879,11 @@ public class FileUtil { LangUtil.throwIaxIfNull(file, "file"); URL result = null; try { - String url = "file:" + file.getAbsolutePath().replace('\\', '/'); + result = file.toURI().toURL(); + if (null != result) { + return result; + } + String url = "file:" + file.getAbsolutePath().replace('\\', '/'); result = new URL(url + (file.isDirectory() ? "/" : "")); } catch (MalformedURLException e) { String m = "Util.makeURL(\"" + file.getPath() + "\" MUE " + e.getMessage(); @@ -1349,6 +1353,7 @@ public class FileUtil { try { final int MAX = 4096; byte[] buf = new byte[MAX]; + // TODO this blocks, hanging the harness int count = in.read(buf, 0, MAX); ByteArrayOutputStream mySnoop; while ((halt && finishStream && (0 < count)) |