JDK-6972385 : issues with String.toLowerCase/toUpperCase
  • Type: Bug
  • Component: security-libs
  • Sub-Component: org.ietf.jgss:krb5
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2010-07-27
  • Updated: 2011-09-20
  • Resolved: 2011-09-20
Related Reports
Duplicate :  
Description
In JDK codes, there are many string comparisons that looks like:
   aString.toUpperCase().startsWith("anotherString")
   aString.toLowerCase().equals("anotherstring")
   aString.toLowerCase().contains("anotherstring")
   etc.

The String.toLowerCase/toUpperCase() equals to String.toLowerCase/toUpperCase(Locale.getDefault()). According to CR 6208680 and the spec of String.toLowerCase/toUpperCase(), for some special region, for example Turkish and Azeri, the conversion maybe locale-sensitive. For example, for Turkish, the "i" is not mapped to "I" with String.toUpperCase(). When the default locale of JVM is set to the special region, the above string comparisons will not be able to work as expected. 

Please check the JGSS source code.

Comments
EVALUATION This is fixed as a part of 7059542.
20-09-2011