summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2013-07-10 11:44:24 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2013-07-10 11:44:24 -0400
commitb2aec83df14dd2f80829ffc496ee04062a7a05e2 (patch)
tree7e54ce95d2d38432e172109f6700c6b6a6c3325e
parent7b55f42ce534817654ce74c0273c74173f0f1d6d (diff)
downloadeclipse.platform.swt-b2aec83df14dd2f80829ffc496ee04062a7a05e2.tar.gz
eclipse.platform.swt-b2aec83df14dd2f80829ffc496ee04062a7a05e2.tar.xz
eclipse.platform.swt-b2aec83df14dd2f80829ffc496ee04062a7a05e2.zip
Bug 412067 - isLoadable(); returns False due URL parse error
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
index 96fdd0490c..a73177abb1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common_j2se/org/eclipse/swt/internal/Library.java
@@ -176,12 +176,12 @@ static boolean isLoadable () {
} catch (MalformedURLException e) {
/* should never happen since url's initial path value must be valid */
}
- String path = url.getPath ();
- int index = path.indexOf ('!');
- File file = new File (path.substring (0, index));
Attributes attributes = null;
try {
+ String path = URLDecoder.decode(url.getPath (), "UTF-8");
+ int index = path.indexOf ('!');
+ File file = new File (path.substring (0, index));
JarFile jar = new JarFile (file);
attributes = jar.getManifest ().getMainAttributes ();
} catch (IOException e) {