diff --git a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java index 2b5c7ea716c..9d078d7b754 100644 --- a/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java +++ b/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/OptionalRules.java @@ -226,7 +226,7 @@ T after(Optional o1, Optional o2) { * Prefer {@link Optional#orElseGet(Supplier)} over {@link Optional#orElse(Object)} if the given * value is not a compile-time constant. */ - abstract static class OrElseToOrElseGet { + static final class OrElseToOrElseGet { @BeforeTemplate T before(Optional o, @NotMatches(CompileTimeConstantExpressionMatcher.class) T value) { return o.orElse(value);