commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [1/4] commons-fileupload git commit: toLowerCase() should always specify a Locale
Date Tue, 05 Dec 2017 15:54:26 GMT
I think you might want Locale.ROOT.

Gary

On Tue, Dec 5, 2017 at 2:59 AM, <markt@apache.org> wrote:

> Repository: commons-fileupload
> Updated Branches:
>   refs/heads/master 6c00d575a -> cae90face
>
>
> toLowerCase() should always specify a Locale
>
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-fileupload/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> commit/3cc0a34d
> Tree: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> tree/3cc0a34d
> Diff: http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> diff/3cc0a34d
>
> Branch: refs/heads/master
> Commit: 3cc0a34d2dd4d8ee6ad2f025a955b6d98e2b8f2d
> Parents: 6c00d57
> Author: Mark Thomas <markt@apache.org>
> Authored: Tue Dec 5 09:57:43 2017 +0000
> Committer: Mark Thomas <markt@apache.org>
> Committed: Tue Dec 5 09:57:43 2017 +0000
>
> ----------------------------------------------------------------------
>  .../java/org/apache/commons/fileupload/util/mime/MimeUtility.java  | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/commons-fileupload/
> blob/3cc0a34d/src/main/java/org/apache/commons/fileupload/
> util/mime/MimeUtility.java
> ----------------------------------------------------------------------
> diff --git a/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
> b/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
> index e92f719..b8a7e46 100644
> --- a/src/main/java/org/apache/commons/fileupload/util/mime/
> MimeUtility.java
> +++ b/src/main/java/org/apache/commons/fileupload/util/mime/
> MimeUtility.java
> @@ -212,7 +212,7 @@ public final class MimeUtility {
>          }
>
>          // pull out the character set information (this is the MIME name
> at this point).
> -        String charset = word.substring(2, charsetPos).toLowerCase();
> +        String charset = word.substring(2, charsetPos).toLowerCase(
> Locale.ENGLISH);
>
>          // now pull out the encoding token the same way.
>          int encodingPos = word.indexOf('?', charsetPos + 1);
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message