ICU-13461 Fixing conditional in Grouper.java (this is J-only code, so an ICU4C fix is not necessary). Clarifying comments in MeasureFormat files.
X-SVN-Rev: 40846
This commit is contained in:
parent
be54542b86
commit
eca52aa122
@ -63,9 +63,9 @@ public class Grouper {
|
||||
return GROUPER_WESTERN;
|
||||
} else if (grouping1 == 3 && grouping2 == 2 && minGrouping == 1) {
|
||||
return GROUPER_INDIC;
|
||||
} else if (grouping1 == 3 && grouping2 == 3 && minGrouping == 1) {
|
||||
} else if (grouping1 == 3 && grouping2 == 3 && minGrouping == 2) {
|
||||
return GROUPER_WESTERN_MIN2;
|
||||
} else if (grouping1 == 3 && grouping2 == 2 && minGrouping == 1) {
|
||||
} else if (grouping1 == 3 && grouping2 == 2 && minGrouping == 2) {
|
||||
return GROUPER_INDIC_MIN2;
|
||||
} else {
|
||||
return new Grouper(grouping1, grouping2, minGrouping);
|
||||
|
@ -1044,7 +1044,7 @@ public class MeasureFormat extends UFormat {
|
||||
case TIME_UNIT_FORMAT:
|
||||
return createTimeUnitFormat();
|
||||
case CURRENCY_FORMAT:
|
||||
return new CurrencyFormat(locale);
|
||||
return MeasureFormat.getCurrencyFormat(locale);
|
||||
default:
|
||||
throw new InvalidObjectException("Unknown subclass: " + subClass);
|
||||
}
|
||||
|
@ -84,19 +84,12 @@ public class TimeUnitFormat extends MeasureFormat {
|
||||
|
||||
private static final long serialVersionUID = -3707773153184971529L;
|
||||
|
||||
// These fields are supposed to be the same as the fields in mf. They
|
||||
// are here for serialization backward compatibility and to support parsing.
|
||||
// Unlike MeasureFormat, this class is mutable and allows a new NumberFormat to be set after
|
||||
// initialization. Keep a second copy of NumberFormat and use it instead of the one from the parent.
|
||||
private NumberFormat format;
|
||||
private ULocale locale;
|
||||
private int style;
|
||||
|
||||
// We use this field in lieu of the super class because the super class
|
||||
// is immutable while this class is mutable. The contents of the super class
|
||||
// is an empty shell. Every public method of the super class is overridden to
|
||||
// delegate to this field. Each time this object mutates, it replaces this field with
|
||||
// a new immutable instance.
|
||||
// private transient MeasureFormat mf;
|
||||
|
||||
private transient Map<TimeUnit, Map<String, Object[]>> timeUnitToCountToPatterns;
|
||||
private transient PluralRules pluralRules;
|
||||
private transient boolean isReady;
|
||||
|
Loading…
Reference in New Issue
Block a user