You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2009/04/16 11:07:08 UTC
svn commit: r765523 -
/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
Author: tellison
Date: Thu Apr 16 09:07:08 2009
New Revision: 765523
URL: http://svn.apache.org/viewvc?rev=765523&view=rev
Log:
Patch for HARMONY-6082 ([classlib][prefs] WindowsPreferences class fails to allow for Windows encoding of values)
Modified:
harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
Modified: harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java?rev=765523&r1=765522&r2=765523&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java Thu Apr 16 09:07:08 2009
@@ -112,7 +112,7 @@
if (error[ERROR_CODE] != 0) {
return null;
}
- return new String(result);
+ return decodeWindowsStr(new String(result));
}
@Override
@@ -133,7 +133,7 @@
@Override
protected void putSpi(String name, String value) {
int[] errorCode = new int[1];
- putValue(path, encodeWindowsStr(name).getBytes(), value.getBytes(), userNode, errorCode);
+ putValue(path, encodeWindowsStr(name).getBytes(), encodeWindowsStr(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$