aboutsummaryrefslogtreecommitdiff
path: root/src/launch
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-01-20 22:37:46 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-01-20 22:37:46 +0100
commitf153f1cda304d56f9b20cd5e39adf83e74067045 (patch)
tree332bb85125a3134a15ba132f9fbfa3ef182b4e7f /src/launch
parent19de8fbe4743afc58df39555602c67e46fc2e016 (diff)
parent296d1c2ed8a6aa29fb2a1ce7f16ea9e39b49d7d5 (diff)
downloadlombok-f153f1cda304d56f9b20cd5e39adf83e74067045.tar.gz
lombok-f153f1cda304d56f9b20cd5e39adf83e74067045.tar.bz2
lombok-f153f1cda304d56f9b20cd5e39adf83e74067045.zip
Merge the @Singular feature and the fix for ecj and the shadowloader.
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) {}