Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2008-07-02 16:51:01 -0400
committerThomas Watson2008-07-02 16:51:01 -0400
commit4741bdda3ea01c6f7bc498880b54b57bc04cc390 (patch)
treee446ec4e28d6fc1d77db4c78fdf737e5274d1fe5 /bundles
parentb6d3f893a353419b657206204188cef838a9f700 (diff)
downloadrt.equinox.framework-4741bdda3ea01c6f7bc498880b54b57bc04cc390.tar.gz
rt.equinox.framework-4741bdda3ea01c6f7bc498880b54b57bc04cc390.tar.xz
rt.equinox.framework-4741bdda3ea01c6f7bc498880b54b57bc04cc390.zip
Bug 239356 Can't create the osgi.instance.area on a UNC drive
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java7
-rw-r--r--bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java13
-rw-r--r--bundles/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java4
3 files changed, 9 insertions, 15 deletions
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
index adbb62a4d..9b2fc9359 100644
--- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
+++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/EclipseStarter.java
@@ -1015,12 +1015,9 @@ public class EclipseStarter {
private static String getSysPathFromURL(String urlSpec) {
if (urlSpec == null)
return null;
- URL url = null;
- try {
- url = new URL(urlSpec);
- } catch (MalformedURLException e) {
+ URL url = LocationHelper.buildURL(urlSpec, false);
+ if (url == null)
return null;
- }
File fwkFile = new File(url.getFile());
fwkFile = new File(fwkFile.getAbsolutePath());
fwkFile = new File(fwkFile.getParent());
diff --git a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
index d9c664a4b..5553ed68f 100644
--- a/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
+++ b/bundles/org.eclipse.osgi/eclipseAdaptor/src/org/eclipse/core/runtime/adaptor/LocationManager.java
@@ -215,13 +215,8 @@ public class LocationManager {
private static URL computeInstallConfigurationLocation() {
String property = FrameworkProperties.getProperty(PROP_INSTALL_AREA);
- if (property != null) {
- try {
- return new URL(property);
- } catch (MalformedURLException e) {
- // do nothing here since it is basically impossible to get a bogus url
- }
- }
+ if (property != null)
+ return LocationHelper.buildURL(property, true);
return null;
}
@@ -230,7 +225,9 @@ public class LocationManager {
if (property == null)
return null;
try {
- URL sharedConfigurationURL = new URL(property);
+ URL sharedConfigurationURL = LocationHelper.buildURL(property, true);
+ if (sharedConfigurationURL == null)
+ return null;
if (sharedConfigurationURL.getPath().startsWith("/")) //$NON-NLS-1$
// absolute
return sharedConfigurationURL;
diff --git a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
index 1a31eb064..9fefaf81a 100644
--- a/bundles/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
+++ b/bundles/org.eclipse.osgi/supplement/src/org/eclipse/core/runtime/internal/adaptor/BasicLocation.java
@@ -132,7 +132,7 @@ public class BasicLocation implements Location {
if (value.getProtocol().equalsIgnoreCase("file")) { //$NON-NLS-1$
try {
String basePath = new File(value.getFile()).getCanonicalPath();
- value = new URL("file:" + basePath); //$NON-NLS-1$
+ value = LocationHelper.buildURL("file:" + basePath, true); //$NON-NLS-1$
} catch (IOException e) {
// do nothing just use the original value
}
@@ -144,7 +144,7 @@ public class BasicLocation implements Location {
return false;
}
lockFile = file;
- location = LocationHelper.buildURL(value.toExternalForm(), true);
+ location = value;
if (property != null)
FrameworkProperties.setProperty(property, location.toExternalForm());
return lock;

Back to the top