# HG changeset patch # User pmuthuswamy # Date 1525659289 -19800 # Node ID caf05d64138f46eb8aa3dba04507deb4480a4f4a # Parent 7238cb613dc5b84a1055c77c99bedf12c3c2f2f8 8200094: Turkish locale reports NPE No enum constant com.sun.source.doctree.DocTree.Kind.SÄ°NCE Reviewed-by: ksrini, jjg diff -r 7238cb613dc5 -r caf05d64138f 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;