OptionalOfRedundantMethod
Optional.of() always returns a non-empty optional. Using ifPresent/isPresent/orElse/orElseGet/orElseThrow/isPresent/or/orNull method on it is unnecessary and most probably a bug.
Suppression
Suppress false positives by adding the suppression annotation @SuppressWarnings("OptionalOfRedundantMethod")
to the enclosing element.