Period.from(TemporalAmount) will always throw a DateTimeException when passed a Duration and return itself when passed a Period.
Suppress false positives by adding the suppression annotation @SuppressWarnings("PeriodFrom")
to the enclosing element.