Skip to content

Commit

Permalink
Use addSuppressed in AbstractExecutionThreadService, and otherwis…
Browse files Browse the repository at this point in the history
…e update/clarify code pinned to "Java 7" / old versions of Android.

RELNOTES=n/a
PiperOrigin-RevId: 686882751
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Oct 17, 2024
1 parent 62d61a1 commit a3a94ee
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions core/src/main/java/com/google/common/truth/ExpectFailure.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,8 @@ public void evaluate() throws Throwable {
* A "functional interface" for {@link #expectFailure expectFailure()} to invoke and capture
* failures.
*
* <p>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.
* <p>Users should pass a lambda to {@code .expectFailure()} rather than directly implement this
* interface.
*/
public interface StandardSubjectBuilderCallback {
void invokeAssertion(StandardSubjectBuilder whenTesting);
Expand All @@ -221,10 +219,8 @@ public interface StandardSubjectBuilderCallback {
* A "functional interface" for {@link #expectFailureAbout expectFailureAbout()} to invoke and
* capture failures.
*
* <p>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.
* <p>Users should pass a lambda to {@code .expectFailureAbout()} rather than directly implement
* this interface.
*/
public interface SimpleSubjectBuilderCallback<S extends Subject, A> {
void invokeAssertion(SimpleSubjectBuilder<S, A> whenTesting);
Expand Down

0 comments on commit a3a94ee

Please sign in to comment.