harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r1000696 - /harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java
Date Fri, 24 Sep 2010 03:56:53 GMT
Author: tellison
Date: Fri Sep 24 03:56:53 2010
New Revision: 1000696

URL: http://svn.apache.org/viewvc?rev=1000696&view=rev
Log:
Ensure the hashCode is computed using locale insensitive lowercasing.

Modified:
    harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java

Modified: harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java?rev=1000696&r1=1000695&r2=1000696&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java (original)
+++ harmony/enhanced/java/trunk/classlib/modules/luni/src/main/java/java/io/File.java Fri
Sep 24 03:56:53 2010
@@ -24,6 +24,7 @@ import java.security.AccessController;
 import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 import org.apache.harmony.luni.internal.io.FileCanonPathCache;
 import org.apache.harmony.luni.util.DeleteOnExit;
@@ -753,7 +754,7 @@ public class File implements Serializabl
         if (caseSensitive) {
             return path.hashCode() ^ 1234321;
         }
-        return path.toLowerCase().hashCode() ^ 1234321;
+        return path.toLowerCase(Locale.ENGLISH).hashCode() ^ 1234321;
     }
 
     /**



Mime
View raw message