summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisberg <wisberg>2005-05-12 11:49:53 +0000
committerwisberg <wisberg>2005-05-12 11:49:53 +0000
commitdc3b4431dc66eff79ec34a3207972a06f9788ad0 (patch)
tree46bcefcb83b39a1b1657e0b2adfb811852ab2313
parent8ba1011bac38511fe8546766951c08d812257de2 (diff)
downloadaspectj-dc3b4431dc66eff79ec34a3207972a06f9788ad0.tar.gz
aspectj-dc3b4431dc66eff79ec34a3207972a06f9788ad0.zip
FileToURL via URI
-rw-r--r--util/src/org/aspectj/util/FileUtil.java7
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))