8200094: Turkish locale reports NPE No enum constant com.sun.source.doctree.DocTree.Kind.SİNCE
authorpmuthuswamy
Mon, 07 May 2018 07:44:49 +0530
changeset 50025 caf05d64138f
parent 50024 7238cb613dc5
child 50026 e81481fea884
8200094: Turkish locale reports NPE No enum constant com.sun.source.doctree.DocTree.Kind.SİNCE Reviewed-by: ksrini, jjg
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Sun May 06 00:42:59 2018 +0200
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Mon May 07 07:44:49 2018 +0530
@@ -1338,6 +1338,16 @@
     }
 
     /**
+     * Returns a locale independent upper cased String. That is, it
+     * always uses US locale, this is a clone of the one in StringUtils.
+     * @param s to convert
+     * @return converted String
+     */
+    public static String toUpperCase(String s) {
+        return s.toUpperCase(Locale.US);
+    }
+
+    /**
      * Returns a locale independent lower cased String. That is, it
      * always uses US locale, this is a clone of the one in StringUtils.
      * @param s to convert
@@ -2869,7 +2879,7 @@
             case "throws":
             case "exception":
             case "version":
-                kind = DocTree.Kind.valueOf(tagName.toUpperCase());
+                kind = DocTree.Kind.valueOf(toUpperCase(tagName));
                 return getBlockTags(element, kind);
             case "serialData":
                 kind = SERIAL_DATA;