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 51b9eaf0e78..70f99e3aa24 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 @@ -228,7 +228,7 @@ T after(Optional o1, Optional o2) { * value is a method invocation with two or more arguments. */ // XXX: Extend rule to all method invocations (with less than 2 arguments). - static final class OrElseToOrElseGet { + static final class OptionalOrElseGet { @BeforeTemplate T before(Optional o, @Matches(IsMethodInvocationWithTwoOrMoreArgs.class) T value) { return o.orElse(value); diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestInput.java index 060aadb7f41..99a99c0b806 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestInput.java @@ -120,7 +120,7 @@ Optional testOptionalMap() { return Optional.of(1).stream().map(String::valueOf).findAny(); } - ImmutableSet testOrElseToOrElseGet() { + ImmutableSet testOptionalOrElseGet() { return ImmutableSet.of( Optional.of("foo").orElse("bar"), Optional.of("foo").orElse(toString()), diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestOutput.java index b7f496b1da7..6ff163f7652 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/OptionalRulesTestOutput.java @@ -113,7 +113,7 @@ Optional testOptionalMap() { return Optional.of(1).map(String::valueOf); } - ImmutableSet testOrElseToOrElseGet() { + ImmutableSet testOptionalOrElseGet() { return ImmutableSet.of( Optional.of("foo").orElse("bar"), Optional.of("foo").orElse(toString()),