diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-19 04:32:47 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-06-19 04:32:47 +0200 |
commit | b964ec18fcc7f8fcbae40ef34113c972785629a3 (patch) | |
tree | 212a5c4d61ec1a02e83492070ba7300b478e7a71 /src_eclipseagent/lombok | |
parent | 7f7cdfc3fc9cbaf453137a6f27ac0472b41736c1 (diff) | |
download | lombok-b964ec18fcc7f8fcbae40ef34113c972785629a3.tar.gz lombok-b964ec18fcc7f8fcbae40ef34113c972785629a3.tar.bz2 lombok-b964ec18fcc7f8fcbae40ef34113c972785629a3.zip |
Finding lombok.jar would fail if you had any spaces in the path. Fixed that.
Diffstat (limited to 'src_eclipseagent/lombok')
-rw-r--r-- | src_eclipseagent/lombok/eclipse/agent/EclipsePatcher.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src_eclipseagent/lombok/eclipse/agent/EclipsePatcher.java b/src_eclipseagent/lombok/eclipse/agent/EclipsePatcher.java index 7011caab..fd247d5b 100644 --- a/src_eclipseagent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src_eclipseagent/lombok/eclipse/agent/EclipsePatcher.java @@ -9,6 +9,8 @@ import java.lang.instrument.UnmodifiableClassException; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.net.URI; +import java.net.URLDecoder; +import java.nio.charset.Charset; import java.security.ProtectionDomain; import java.util.jar.JarFile; import java.util.regex.Matcher; @@ -78,7 +80,8 @@ public class EclipsePatcher { Pattern p = Pattern.compile("^jar:file:([^\\!]+)\\!.*\\.class$"); Matcher m = p.matcher(uri.toString()); if ( !m.matches() ) return "."; - return new File(m.group(1)).getParent(); + String rawUri = m.group(1); + return new File(URLDecoder.decode(rawUri, Charset.defaultCharset().name())).getParent(); } public static void premain(String agentArgs, Instrumentation instrumentation) throws Exception { |