mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Revert changes in OptionalTemplates
This commit is contained in:
committed by
Stephan Schroevers
parent
8bd88bbe01
commit
302e20b212
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user