mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-11621 Changes in response to code review
X-SVN-Rev: 38594
This commit is contained in:
parent
1e38653868
commit
aeff22719e
1 changed files with 6 additions and 0 deletions
|
@ -1762,7 +1762,13 @@ public class DecimalFormat extends NumberFormat {
|
|||
|
||||
// add the decimal separator if it is to be always shown AND there are no decimal digits
|
||||
if ((fracBegin == -1) && this.decimalSeparatorAlwaysShown) {
|
||||
if (fieldPosition.getFieldAttribute() == Field.DECIMAL_SEPARATOR) {
|
||||
fieldPosition.setBeginIndex(result.length());
|
||||
}
|
||||
result.append(decimal);
|
||||
if (fieldPosition.getFieldAttribute() == Field.DECIMAL_SEPARATOR) {
|
||||
fieldPosition.setEndIndex(result.length());
|
||||
}
|
||||
if (parseAttr) {
|
||||
// Length of decimal separator is 1.
|
||||
int decimalSeparatorBegin = result.length() - 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue