Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-01-22 22:30:40 +0000
committerJohn Arthorne2010-01-22 22:30:40 +0000
commita99e378587d01c340f2d2951b7fccd6bd4bd1518 (patch)
tree8cdbe97d92bb3b7ff8cebcfb6e642d41cc9d2e15 /bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox
parenteeefc19f85c23b455d38093edfd06bde2319d9f4 (diff)
downloadrt.equinox.p2-a99e378587d01c340f2d2951b7fccd6bd4bd1518.tar.gz
rt.equinox.p2-a99e378587d01c340f2d2951b7fccd6bd4bd1518.tar.xz
rt.equinox.p2-a99e378587d01c340f2d2951b7fccd6bd4bd1518.zip
Bug 296066 - Creating Agent with file path
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox')
-rw-r--r--bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
index 45f8a9d66..bb304a528 100644
--- a/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
+++ b/bundles/org.eclipse.equinox.p2.core/src/org/eclipse/equinox/internal/p2/core/Activator.java
@@ -11,8 +11,7 @@
package org.eclipse.equinox.internal.p2.core;
import java.io.File;
-import java.net.URI;
-import java.net.URISyntaxException;
+import java.net.*;
import java.util.Dictionary;
import java.util.Hashtable;
import org.eclipse.core.runtime.Path;
@@ -76,8 +75,11 @@ public class Activator implements BundleActivator {
try {
if (isFile)
return adjustTrailingSlash(new File(spec.substring(5)).toURI(), trailingSlash);
+ //for compatibility only allow non-file URI if it is also a legal URL
+ //when given "c:/foo" we want to treat it as a file rather than a URI with protocol "c"
+ new URL(spec);
return new URI(spec);
- } catch (URISyntaxException e) {
+ } catch (Exception e) {
// if we failed and it is a file spec, there is nothing more we can do
// otherwise, try to make the spec into a file URL.
if (isFile)

Back to the top