Polish 'Add Period converter support'
Polish period converter support, primarily by changing `PeriodStyle` to parse and print periods that include more than one unit. See gh-21136
This commit is contained in:
@@ -116,6 +116,19 @@ public class JavaCompilerFieldValuesParser implements FieldValuesParser {
|
||||
DURATION_SUFFIX = Collections.unmodifiableMap(values);
|
||||
}
|
||||
|
||||
private static final String PERIOD_OF = "Period.of";
|
||||
|
||||
private static final Map<String, String> PERIOD_SUFFIX;
|
||||
|
||||
static {
|
||||
Map<String, String> values = new HashMap<>();
|
||||
values.put("Days", "d");
|
||||
values.put("Weeks", "w");
|
||||
values.put("Months", "m");
|
||||
values.put("Years", "y");
|
||||
PERIOD_SUFFIX = Collections.unmodifiableMap(values);
|
||||
}
|
||||
|
||||
private static final String DATA_SIZE_OF = "DataSize.of";
|
||||
|
||||
private static final Map<String, String> DATA_SIZE_SUFFIX;
|
||||
@@ -130,19 +143,6 @@ public class JavaCompilerFieldValuesParser implements FieldValuesParser {
|
||||
DATA_SIZE_SUFFIX = Collections.unmodifiableMap(values);
|
||||
}
|
||||
|
||||
private static final String PERIOD_OF = "Period.of";
|
||||
|
||||
private static final Map<String, String> PERIOD_SUFFIX;
|
||||
|
||||
static {
|
||||
Map<String, String> values = new HashMap<>();
|
||||
values.put("Days", "d");
|
||||
values.put("Weeks", "w");
|
||||
values.put("Months", "m");
|
||||
values.put("Years", "y");
|
||||
PERIOD_SUFFIX = Collections.unmodifiableMap(values);
|
||||
}
|
||||
|
||||
private final Map<String, Object> fieldValues = new HashMap<>();
|
||||
|
||||
private final Map<String, Object> staticFinals = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user