8193454: ModuleDescriptor.{Requires,Exports,Open} toString should use toLowerCase(Local.ROOT)
Reviewed-by: alanb
Contributed-by: andrej.golovnin@gmail.com
--- 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(" "));
}