DurationTemporalUnit
Duration APIs only work for DAYS or exact durations.

Severity
ERROR
Has Fix?
NO_FIX

The problem

Duration APIs only work for TemporalUnits with exact durations or ChronoUnit.DAYS. E.g., Duration.of(1, ChronoUnit.YEARS) is guaranteed to throw a DateTimeException.

Suppression

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