The last replace seems a bit strange, I would expect it should first normalize 
the case and then the hyphen, otherwise it won’t match the replace?

Looks to me like not using toUpperCase in the trace messages would be more 
efficient and produces shorter code.

Isn’t it customary to use the ROOT locale instead of ENGLISH?
Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: security-dev <security-dev-r...@openjdk.java.net> im Auftrag von Xue-Lei 
Andrew Fan <xue...@openjdk.java.net>
Gesendet: Wednesday, February 23, 2022 1:12:16 AM
An: security-dev@openjdk.java.net <security-dev@openjdk.java.net>
Betreff: RFR: 8282279: Interpret case-insensitive string locale independently

The String.toUpperCase() or String.toLowerCase() method is locale sensitive, 
and may produce unexpected results if used for strings that are intended to be 
interpreted locale independently.  The use of the two methods had been cleaned 
before, but there are a few new introduced laterly.

See https://www.ivi.co/java/2011/07/07/4878.html for examples.

-------------

Commit messages:
 - 8282279: Interpret case-insensitive string locale independently

Changes: https://git.openjdk.java.net/jdk/pull/7583/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7583&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8282279
  Stats: 18 lines in 5 files changed: 5 ins; 0 del; 13 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7583.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7583/head:pull/7583

PR: https://git.openjdk.java.net/jdk/pull/7583

Reply via email to