Skip to content

Commit

Permalink
Update hamcrest to v2.2
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 637991390
  • Loading branch information
cushon authored and Error Prone Team committed May 28, 2024
1 parent 6f265dd commit 3fff610
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@
<!-- BSD New (3 clause) -->
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- BSD New (3 clause) -->
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,15 @@ public class ExpectedExceptionChecker extends BugChecker implements MethodTreeMa
.withNameMatching(Pattern.compile("expect.*")));

static final Matcher<ExpressionTree> IS_A =
staticMethod()
.onClassAny("org.hamcrest.Matchers", "org.hamcrest.CoreMatchers", "org.hamcrest.core.Is")
.withSignature("<T>isA(java.lang.Class<T>)");
anyOf(
staticMethod()
.onClassAny(
"org.hamcrest.Matchers", "org.hamcrest.CoreMatchers", "org.hamcrest.core.Is")
.withSignature("<T>isA(java.lang.Class<T>)"),
staticMethod()
.onClassAny(
"org.hamcrest.Matchers", "org.hamcrest.CoreMatchers", "org.hamcrest.core.Is")
.withSignature("<T>isA(java.lang.Class<?>)"));

static final Matcher<StatementTree> FAIL_MATCHER =
anyOf(
Expand Down

0 comments on commit 3fff610

Please sign in to comment.