If you call duration.getNano(), you must also call duration.getSeconds() in โnearbyโ code. If you are trying to convert this duration to nanoseconds, you probably meant to use duration.toNanos() instead.
Suppress false positives by adding the suppression annotation @SuppressWarnings("JavaDurationGetSecondsGetNano") to the enclosing element.