harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r765523 - /harmony/enhanced/classlib/trunk/modules/prefs/src/main/java/java/util/prefs/RegistryPreferencesImpl.java
Date Thu, 16 Apr 2009 09:07:08 GMT
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$



Mime
View raw message