PeriodFrom
Period.from(Period) returns itself; from(Duration) throws a runtime exception.

Severity
ERROR
Has Fix?
REQUIRES_HUMAN_ATTENTION

The problem

Period.from(TemporalAmount) will always throw a DateTimeException when passed a Duration and return itself when passed a Period.

Suppression

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