PeriodGetTemporalUnit
Period.get() only works with YEARS, MONTHS, or DAYS.

Severity
ERROR
Has Fix?

The problem

Period.get(TemporalUnit) only works when passed ChronoUnit.YEARS, ChronoUnit.MONTHS, or ChronoUnit.DAYS. All other values are guaranteed to throw an UnsupportedTemporalTypeException.

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("PeriodGetTemporalUnit") to the enclosing element.