diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal')
3 files changed, 11 insertions, 4 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..ef12ec664 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation and others. + * Copyright (c) 2007, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -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..86a09699f 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 @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2005, 2008 IBM Corporation and others. +# Copyright (c) 2005, 2010 IBM Corporation and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -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 fdac9ca8c..69731603e 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -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(); |