8272616: Strange code in java.text.DecimalFormat#applyPattern
Reviewed-by: bpb, naoto, iris
This commit is contained in:
parent
03b5e99d99
commit
51c1b9a687
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -3406,7 +3406,6 @@ public class DecimalFormat extends NumberFormat {
|
|||||||
// opening quote or two quotes, which is a quote
|
// opening quote or two quotes, which is a quote
|
||||||
// literal. That is, we have the first quote in 'do'
|
// literal. That is, we have the first quote in 'do'
|
||||||
// or o''clock.
|
// or o''clock.
|
||||||
if (ch == QUOTE) {
|
|
||||||
if ((pos+1) < pattern.length() &&
|
if ((pos+1) < pattern.length() &&
|
||||||
pattern.charAt(pos+1) == QUOTE) {
|
pattern.charAt(pos+1) == QUOTE) {
|
||||||
++pos;
|
++pos;
|
||||||
@ -3415,7 +3414,6 @@ public class DecimalFormat extends NumberFormat {
|
|||||||
inQuote = true; // 'do'
|
inQuote = true; // 'do'
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
} else if (ch == separator) {
|
} else if (ch == separator) {
|
||||||
// Don't allow separators before we see digit
|
// Don't allow separators before we see digit
|
||||||
// characters of phase 1, and don't allow separators
|
// characters of phase 1, and don't allow separators
|
||||||
|
Loading…
x
Reference in New Issue
Block a user