mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8134373: use collections convenience factories in the JDK
Reviewed-by: scolebourne, prappo, dfuchs, redestad, smarks
This commit is contained in:
parent
8c7dc29389
commit
a19fc7fbdb
19 changed files with 67 additions and 100 deletions
|
@ -83,8 +83,6 @@ import java.time.temporal.TemporalAmount;
|
|||
import java.time.temporal.TemporalQueries;
|
||||
import java.time.temporal.TemporalUnit;
|
||||
import java.time.temporal.UnsupportedTemporalTypeException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -152,8 +150,7 @@ public final class Period
|
|||
/**
|
||||
* The set of supported units.
|
||||
*/
|
||||
private static final List<TemporalUnit> SUPPORTED_UNITS =
|
||||
Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS));
|
||||
private static final List<TemporalUnit> SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
|
||||
|
||||
/**
|
||||
* The number of years.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue