Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2010-01-25 21:22:34 +0000
committerOleg Besedin2010-01-25 21:22:34 +0000
commit60b3630500f10828f0537ab04521187952034ba6 (patch)
treef8e5ab74a188faf20912de3577f97066bf1f0304 /bundles/org.eclipse.equinox.security
parentba4699d9f9c00d7174574769cfe7a15dbbe160eb (diff)
downloadrt.equinox.bundles-60b3630500f10828f0537ab04521187952034ba6.tar.gz
rt.equinox.bundles-60b3630500f10828f0537ab04521187952034ba6.tar.xz
rt.equinox.bundles-60b3630500f10828f0537ab04521187952034ba6.zip
Bug 300577 - Eclipse workbench will not start if "user.home" contains invalid charactersv20100125
Diffstat (limited to 'bundles/org.eclipse.equinox.security')
-rw-r--r--bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java1
-rw-r--r--bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties1
-rw-r--r--bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java7
3 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
index d978f1af4..7e3e397f3 100644
--- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
+++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/SecAuthMessages.java
@@ -29,6 +29,7 @@ public class SecAuthMessages extends NLS {
public static String startFirst;
public static String stopFirst;
public static String unsupoprtedCharEncoding;
+ public static String badStorageURL;
// Configuration provider
public static String unexpectedConfigElement;
diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
index f87774348..b4603e1d4 100644
--- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
+++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/auth/nls/messages.properties
@@ -22,6 +22,7 @@ loginFailure = Failed to log in.
startFirst = Secure platform is not running. Make sure that secure platform is started.
stopFirst = Secure platform is already running. Make sure that secure platform is stopped first.
unsupoprtedCharEncoding = Default secure storage encoding \"{0}\" is not supported by the Java virtual machine.
+badStorageURL = Unable to resolve secure storage location \"{0}\".
## Configuration provider
invalidConfigURL = Invalid URL \"{0}\" specified by \"{1}\" for Configuration provider.
diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
index f372ccf37..aa777a85c 100644
--- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
+++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java
@@ -68,7 +68,7 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage
static private ILock lock = Job.getJobManager().newLock();
- final private URL location;
+ private URL location;
private long timestamp = 0;
@@ -112,6 +112,11 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage
properties.load(is);
timestamp = getLastModified();
}
+ } catch (IllegalArgumentException e) {
+ String msg = NLS.bind(SecAuthMessages.badStorageURL, location.toString());
+ AuthPlugin.getDefault().logError(msg, e);
+ location = null; // don't attempt to use it
+ return;
} finally {
if (is != null)
is.close();

Back to the top