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 660f592fdc..4d1d17edd3 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 @@ -231,7 +231,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 654b3f9f22..d644bdfcb0 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 f4c3d6b2bc..1dcf889d53 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()),