diff options
author | Thomas Watson | 2016-10-24 20:00:55 +0000 |
---|---|---|
committer | Thomas Watson | 2016-11-07 20:19:26 +0000 |
commit | e71e4cbe7f8f7d813d890e522979a490d8f295ab (patch) | |
tree | e86ab2f1e71292b033ed687c3090ef4f73e97902 /bundles/org.eclipse.equinox.launcher | |
parent | cc11dbcc759c5d04377bdb1a3b1c1ffe005f01ac (diff) | |
download | rt.equinox.framework-e71e4cbe7f8f7d813d890e522979a490d8f295ab.tar.gz rt.equinox.framework-e71e4cbe7f8f7d813d890e522979a490d8f295ab.tar.xz rt.equinox.framework-e71e4cbe7f8f7d813d890e522979a490d8f295ab.zip |
Bug 507178 - Issues with encoding/decoding file URLs in variousY20161110-1000I20161111-1220I20161111-0900I20161111-0740I20161111-0510I20161110-2030I20161110-1630I20161110-1225I20161110-1130I20161110-0710I20161110-0510I20161109-2000I20161108-1015I20161108-0800
scenarios
Change-Id: I2cf6b79d055eef7fb180f3f0f75032cbb84b7d51
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.launcher')
-rw-r--r-- | bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java index 34bcf44d3..bbec0b646 100644 --- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java +++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java @@ -2137,7 +2137,7 @@ public class Main { Properties props = new Properties(); InputStream is = null; try { - is = url.openStream(); + is = getStream(url); props.load(is); } finally { if (is != null) @@ -2150,6 +2150,17 @@ public class Main { return props; } + private InputStream getStream(URL location) throws IOException { + if ("file".equalsIgnoreCase(location.getProtocol())) { //$NON-NLS-1$ + // this is done to handle URLs with invalid syntax in the path + File f = new File(location.getPath()); + if (f.exists()) { + return new FileInputStream(f); + } + } + return location.openStream(); + } + /* * Handle splash screen. * The splash screen is displayed natively. Whether or not the splash screen |