changeset 48346:43edfde828ab

8193454: ModuleDescriptor.{Requires,Exports,Open} toString should use toLowerCase(Local.ROOT) Reviewed-by: alanb Contributed-by: andrej.golovnin@gmail.com
author alanb
date Wed, 13 Dec 2017 15:32:36 +0000
parents 8ca86cfb126f
children daf3b49f4839
files src/java.base/share/classes/java/lang/module/ModuleDescriptor.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Wed Dec 06 15:51:06 2017 -0800
+++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java	Wed Dec 13 15:32:36 2017 +0000
@@ -39,6 +39,7 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Optional;
@@ -2603,7 +2604,8 @@
      * Returns a string containing the given set of modifiers and label.
      */
     private static <M> String toString(Set<M> mods, String what) {
-        return (Stream.concat(mods.stream().map(e -> e.toString().toLowerCase()),
+        return (Stream.concat(mods.stream().map(e -> e.toString()
+                                                      .toLowerCase(Locale.ROOT)),
                               Stream.of(what)))
                 .collect(Collectors.joining(" "));
     }