aboutsummaryrefslogtreecommitdiff
path: root/src/launch
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2014-12-08 22:28:05 +0100
committerRoel Spilker <r.spilker@gmail.com>2014-12-08 22:28:05 +0100
commit3765835181fd4f69c4b7032687e066ae9c10c500 (patch)
treeed9fe5e6b2beadfb7dd92e1fad2a9eb2691c1f9a /src/launch
parent2e78a2e03f8fdba4d3d468b2900d30f7e7317641 (diff)
downloadlombok-3765835181fd4f69c4b7032687e066ae9c10c500.tar.gz
lombok-3765835181fd4f69c4b7032687e066ae9c10c500.tar.bz2
lombok-3765835181fd4f69c4b7032687e066ae9c10c500.zip
ShadowClassLoader didn't work on windows. The usual 'converting paths to
urls and back is an utter mystery' problems.
Diffstat (limited to 'src/launch')
-rw-r--r--src/launch/lombok/launch/ShadowClassLoader.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/launch/lombok/launch/ShadowClassLoader.java b/src/launch/lombok/launch/ShadowClassLoader.java
index 79809b2f..b883bd71 100644
--- a/src/launch/lombok/launch/ShadowClassLoader.java
+++ b/src/launch/lombok/launch/ShadowClassLoader.java
@@ -211,24 +211,26 @@ class ShadowClassLoader extends ClassLoader {
if (!location.isFile() || !location.canRead()) return null;
- String absolutePath; {
+ File absoluteFile; {
try {
- absolutePath = location.getCanonicalPath();
+ absoluteFile = location.getCanonicalFile();
} catch (Exception e) {
- absolutePath = location.getAbsolutePath();
+ absoluteFile = location.getAbsoluteFile();
}
}
- List<String> jarContents = getOrMakeJarListing(absolutePath);
+ List<String> jarContents = getOrMakeJarListing(absoluteFile.getAbsolutePath());
+
+ String absoluteUri = absoluteFile.toURI().toString();
try {
if (jarContents.contains(altName)) {
- return new URI("jar:file:" + absolutePath + "!/" + altName).toURL();
+ return new URI("jar:" + absoluteUri + "!/" + altName).toURL();
}
} catch (Exception e) {}
try {
if (jarContents.contains(name)) {
- return new URI("jar:file:" + absolutePath + "!/" + name).toURL();
+ return new URI("jar:" + absoluteUri + "!/" + name).toURL();
}
} catch(Exception e) {}