]> source.dussan.org Git - jgit.git/commit
Don't rely on default locale when using toUpperCase() and toLowerCase() 04/89804/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sat, 28 Jan 2017 14:06:15 +0000 (15:06 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 28 Jan 2017 14:06:15 +0000 (15:06 +0100)
commita4feeb01945e039b39a246f96a1a91b0e4836f01
tree087e1b48290ed529412e8ad48efa341952ee2f1b
parent2eb1bebd605852b7ef240e700943dfba7c0a1b3f
Don't rely on default locale when using toUpperCase() and toLowerCase()

Otherwise these methods may produce unexpected results if used for
strings that are intended to be interpreted locale independently.
Examples are programming language identifiers, protocol keys, and HTML
tags. For instance, "TITLE".toLowerCase() in a Turkish locale returns
"t\u0131tle", where '\u0131' is the LATIN SMALL LETTER DOTLESS I
character.

See
https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#toLowerCase--
http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html

Bug: 511238
Change-Id: Id8d8f37d84d62239c918b81f8d883ed798d87656
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
18 files changed:
org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/SignerV4.java
org.eclipse.jgit.lfs.test/tst/org/eclipse/jgit/lfs/lib/LongObjectIdTest.java
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/WalkEncryptionTest.java
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java
org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/NetRC.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java