Revert changes in OptionalTemplates

This commit is contained in:
Rick Ossendrijver
2022-10-04 14:08:09 +02:00
committed by Stephan Schroevers
parent 8bd88bbe01
commit 302e20b212

View File

@@ -17,11 +17,8 @@ import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import tech.picnic.errorprone.refaster.annotation.Description;
import tech.picnic.errorprone.refaster.annotation.OnlineDocumentation;
/** Refaster templates related to expressions dealing with {@link Optional}s. */
@OnlineDocumentation
final class OptionalTemplates {
private OptionalTemplates() {}
@@ -66,7 +63,7 @@ final class OptionalTemplates {
}
}
@Description("Prefer `Optional#orElseThrow()` over the less explicit `Optional#get()`")
/** Prefer `Optional#orElseThrow()` over the less explicit `Optional#get()` */
static final class OptionalOrElseThrow<T> {
@BeforeTemplate
@SuppressWarnings("NullAway")