Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mlrprananta authored and rickie committed Apr 26, 2023
1 parent ea06be5 commit f9526ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ T after(Optional<T> o1, Optional<T> 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<T> {
static final class OptionalOrElseGet<T> {
@BeforeTemplate
T before(Optional<T> o, @Matches(IsMethodInvocationWithTwoOrMoreArgs.class) T value) {
return o.orElse(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Optional<String> testOptionalMap() {
return Optional.of(1).stream().map(String::valueOf).findAny();
}

ImmutableSet<String> testOrElseToOrElseGet() {
ImmutableSet<String> testOptionalOrElseGet() {
return ImmutableSet.of(
Optional.of("foo").orElse("bar"),
Optional.of("foo").orElse(toString()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Optional<String> testOptionalMap() {
return Optional.of(1).map(String::valueOf);
}

ImmutableSet<String> testOrElseToOrElseGet() {
ImmutableSet<String> testOptionalOrElseGet() {
return ImmutableSet.of(
Optional.of("foo").orElse("bar"),
Optional.of("foo").orElse(toString()),
Expand Down

0 comments on commit f9526ee

Please sign in to comment.