8134373: use collections convenience factories in the JDK

Reviewed-by: scolebourne, prappo, dfuchs, redestad, smarks
This commit is contained in:
Jonathan Bluett-Duncan 2016-10-12 11:54:38 -07:00 committed by Stuart Marks
parent 8c7dc29389
commit a19fc7fbdb
19 changed files with 67 additions and 100 deletions

View file

@ -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.