# HG changeset patch # User jjg # Date 1377035720 25200 # Node ID 59a48a75fac7b32815a183ce4f4c7678eaff695e # Parent d2afcb89b0e7d2e92f3afaa746588e9ca2aed69f 8022080: javadoc generates invalid HTML in Turkish locale Reviewed-by: bpatel diff -r d2afcb89b0e7 -r 59a48a75fac7 langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java Tue Aug 20 14:46:54 2013 -0700 +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java Tue Aug 20 14:55:20 2013 -0700 @@ -25,6 +25,8 @@ package com.sun.tools.doclets.formats.html.markup; +import java.util.Locale; + /** * Enum representing HTML tags. * @@ -115,7 +117,7 @@ HtmlTag(BlockType blockType, EndTag endTag ) { this.blockType = blockType; this.endTag = endTag; - this.value = name().toLowerCase(); + this.value = name().toLowerCase(Locale.US); } /** diff -r d2afcb89b0e7 -r 59a48a75fac7 langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java --- a/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java Tue Aug 20 14:46:54 2013 -0700 +++ b/langtools/src/share/classes/com/sun/tools/doclint/HtmlTag.java Tue Aug 20 14:55:20 2013 -0700 @@ -30,6 +30,7 @@ import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import javax.lang.model.element.Name; @@ -345,7 +346,7 @@ WIDTH; public String getText() { - return name().toLowerCase(); + return toLowerCase(name()); } static final Map index = new HashMap(); @@ -424,11 +425,11 @@ } public String getText() { - return name().toLowerCase(); + return toLowerCase(name()); } public Attr getAttr(Name attrName) { - return Attr.index.get(attrName.toString().toLowerCase()); + return Attr.index.get(toLowerCase(attrName.toString())); } public AttrKind getAttrKind(Name attrName) { @@ -450,6 +451,10 @@ } static HtmlTag get(Name tagName) { - return index.get(tagName.toString().toLowerCase()); + return index.get(toLowerCase(tagName.toString())); + } + + private static String toLowerCase(String s) { + return s.toLowerCase(Locale.US); } }