-
Bug
-
Resolution: Fixed
-
P5
-
17
-
b12
DecimalFormat.java contains following at line 3404
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/text/DecimalFormat.java#L3404
{code}
} else if (ch == QUOTE) {
// A quote outside quotes indicates either the
// opening quote or two quotes, which is a quote
// literal. That is, we have the first quote in 'do'
// or o''clock.
if (ch == QUOTE) {
if ((pos+1) < pattern.length() &&
pattern.charAt(pos+1) == QUOTE) {
++pos;
affix.append("''"); // o''clock
} else {
inQuote = true; // 'do'
}
continue;
}
{code}
It seems that the second condition is always true.
https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/text/DecimalFormat.java#L3404
{code}
} else if (ch == QUOTE) {
// A quote outside quotes indicates either the
// opening quote or two quotes, which is a quote
// literal. That is, we have the first quote in 'do'
// or o''clock.
if (ch == QUOTE) {
if ((pos+1) < pattern.length() &&
pattern.charAt(pos+1) == QUOTE) {
++pos;
affix.append("''"); // o''clock
} else {
inQuote = true; // 'do'
}
continue;
}
{code}
It seems that the second condition is always true.