ModuleDescriptor#toString(Set<>, String) may produce unexpected results.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ModuleDescriptor#toString(Set<>, String) may produce unexpected results.

Andrej Golovnin
Hi all,

the ModuleDescriptor#toString(Set<>, String) method uses
String#toLowerCase() in the line 2607 without specifying a locale. And
this may lead to unexpected results when you start the JVM for example
with the Turkish locale. This can be fixed by using
String#toLowerCase(Locale) with Locale.ROOT as the argument.

The suggested change is attached as diff.

Best regards,
Andrej Golovnin

ModuleDescriptor_toLowerCase_fix.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ModuleDescriptor#toString(Set<>, String) may produce unexpected results.

Alan Bateman
On 12/12/2017 07:20, Andrej Golovnin wrote:
> Hi all,
>
> the ModuleDescriptor#toString(Set<>, String) method uses
> String#toLowerCase() in the line 2607 without specifying a locale. And
> this may lead to unexpected results when you start the JVM for example
> with the Turkish locale. This can be fixed by using
> String#toLowerCase(Locale) with Locale.ROOT as the argument.
>
Thanks, this should be using toLowerCase(Locale). I'll create a bug for
this.

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: ModuleDescriptor#toString(Set<>, String) may produce unexpected results.

Andrej Golovnin
> Thanks, this should be using toLowerCase(Locale). I'll create a bug for
> this.

Thanks, Alan!

Best regards,
Andrej Golovnin