From a3a94ee27cdb81ecd7dca4b2ce5edb2c15385bd0 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Thu, 17 Oct 2024 05:56:46 -0700 Subject: [PATCH] Use `addSuppressed` in `AbstractExecutionThreadService`, and otherwise update/clarify code pinned to "Java 7" / old versions of Android. RELNOTES=n/a PiperOrigin-RevId: 686882751 --- .../java/com/google/common/truth/ExpectFailure.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/google/common/truth/ExpectFailure.java b/core/src/main/java/com/google/common/truth/ExpectFailure.java index 98b625cc3..8a2443817 100644 --- a/core/src/main/java/com/google/common/truth/ExpectFailure.java +++ b/core/src/main/java/com/google/common/truth/ExpectFailure.java @@ -208,10 +208,8 @@ public void evaluate() throws Throwable { * A "functional interface" for {@link #expectFailure expectFailure()} to invoke and capture * failures. * - *

Java 8+ users should pass a lambda to {@code .expectFailure()} rather than directly - * implement this interface. Java 7+ users can define an {@code @Rule ExpectFailure} instance - * instead, however if you prefer the {@code .expectFailure()} pattern you can use this interface - * to pass in an anonymous class. + *

Users should pass a lambda to {@code .expectFailure()} rather than directly implement this + * interface. */ public interface StandardSubjectBuilderCallback { void invokeAssertion(StandardSubjectBuilder whenTesting); @@ -221,10 +219,8 @@ public interface StandardSubjectBuilderCallback { * A "functional interface" for {@link #expectFailureAbout expectFailureAbout()} to invoke and * capture failures. * - *

Java 8+ users should pass a lambda to {@code .expectFailureAbout()} rather than directly - * implement this interface. Java 7+ users can define an {@code @Rule ExpectFailure} instance - * instead, however if you prefer the {@code .expectFailureAbout()} pattern you can use this - * interface to pass in an anonymous class. + *

Users should pass a lambda to {@code .expectFailureAbout()} rather than directly implement + * this interface. */ public interface SimpleSubjectBuilderCallback { void invokeAssertion(SimpleSubjectBuilder whenTesting);