Index: src/main/java/java/util/prefs/RegistryPreferencesImpl.java =================================================================== --- src/main/java/java/util/prefs/RegistryPreferencesImpl.java (revision 463178) +++ src/main/java/java/util/prefs/RegistryPreferencesImpl.java (working copy) @@ -113,7 +113,8 @@ //FIXME: is it right thing to set newNode here? result.newNode = getNode(path, encodeWindowsStr(name).getBytes(), result.userNode, error); if (error[ERROR_CODE] == RETURN_ACCESS_DENIED) { - throw new SecurityException(); + // prefs.err.00=WARNING: Couldn't get node "{0}" with registry path "{1}", access denied! + System.out.println(Messages.getString("prefs.err.00", name, new String(path))); //$NON-NLS-1$ } return result; } @@ -154,8 +155,8 @@ int[] errorCode = new int[1]; putValue(path, encodeWindowsStr(name).getBytes(), value.getBytes(), userNode, errorCode); if (errorCode[ERROR_CODE] == RETURN_ACCESS_DENIED) { - // prefs.E=Access denied\! - throw new SecurityException(Messages.getString("prefs.E")); //$NON-NLS-1$ + // prefs.err.01=WARNING: Couldn't put value with the registry path "{0}", access denied! + System.out.println(Messages.getString("prefs.err.01", new String(path))); //$NON-NLS-1$ } } @@ -173,8 +174,8 @@ int[] errorCode = new int[1]; removeKey(path, encodeWindowsStr(key).getBytes(), userNode, errorCode); if (errorCode[ERROR_CODE] == RETURN_ACCESS_DENIED) { - // prefs.E=Access denied\! - throw new SecurityException(Messages.getString("prefs.E")); //$NON-NLS-1$ + // prefs.err.02=WARNING: Couldn't remove key with the registry path "{0}", access denied! + System.out.println(Messages.getString("prefs.err.02", new String(path))); //$NON-NLS-1$ } } Index: src/main/java/org/apache/harmony/prefs/internal/nls/messages.properties =================================================================== --- src/main/java/org/apache/harmony/prefs/internal/nls/messages.properties (revision 463178) +++ src/main/java/org/apache/harmony/prefs/internal/nls/messages.properties (working copy) @@ -31,3 +31,7 @@ prefs.D=Enumerate keys error\! prefs.E=Access denied\! prefs.F=Remove node error\! + +prefs.err.00=WARNING: Couldn't get node "{0}" with registry path "{1}", access denied! +prefs.err.01=WARNING: Couldn't put value with the registry path "{0}", access denied! +prefs.err.02=WARNING: Couldn't remove key with the registry path "{0}", access denied!