changeset 50561:caf05d64138f

8200094: Turkish locale reports NPE No enum constant com.sun.source.doctree.DocTree.Kind.S?NCE Reviewed-by: ksrini, jjg
author pmuthuswamy
date Mon, 07 May 2018 07:44:49 +0530
parents 7238cb613dc5
children e81481fea884
files src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;