Skip to content

Commit

Permalink
Update errorprone to 2.4.0 for Java 14 support (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
epeee committed Jun 17, 2020
1 parent e5a9da5 commit 6f6766c
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Expand Up @@ -6,7 +6,7 @@ def versions = [:]

versions.bytebuddy = '1.10.10'
versions.junitJupiter = '5.4.2'
versions.errorprone = '2.3.2'
versions.errorprone = '2.4.0'

libraries.junit4 = 'junit:junit:4.12'
libraries.junitJupiterApi = "org.junit.jupiter:junit-jupiter-api:${versions.junitJupiter}"
Expand Down
4 changes: 0 additions & 4 deletions gradle/errorprone.gradle
Expand Up @@ -10,7 +10,3 @@ if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
dependencies {
errorprone libraries.errorprone
}

tasks.named("compileTestJava").configure {
options.errorprone.errorproneArgs << "-Xep:MockitoCast:OFF"
}
Expand Up @@ -31,6 +31,7 @@ public void shouldKnowIfObjectsAreEqual() throws Exception {
assertFalse(areEqual(new int[] {1}, new double[] {1.0}));
}

@SuppressWarnings("EqualsHashCode")
private final class BadEquals {
@Override
public boolean equals(Object oth) {
Expand Down
Expand Up @@ -24,6 +24,7 @@ public void shouldWork() throws Exception {
assertFalse(set.contains(new Object()));
}

@SuppressWarnings("EqualsHashCode")
class Fake {
@Override
public boolean equals(Object obj) {
Expand Down
Expand Up @@ -272,6 +272,7 @@ public void can_extract_interface_type_from_bounds_on_terminal_typeVariable() {
).isEmpty();
}

@SuppressWarnings("EqualsHashCode")
private ParameterizedType parameterizedTypeOf(final Class<?> rawType, final Class<?> ownerType, final Type... actualTypeArguments) {
return new ParameterizedType() {
@Override
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/mockitousage/matchers/MatchersTest.java
Expand Up @@ -340,6 +340,7 @@ public void should_use_smart_equals_for_primitive_arrays() throws Exception {
verify(mock).objectArgMethod(new int[]{1, 2});
}

@SuppressWarnings("ReturnValueIgnored")
@Test(expected = ArgumentsAreDifferent.class)
public void array_equals_should_throw_ArgumentsAreDifferentException_for_non_matching_arguments() {
List<Object> list = Mockito.mock(List.class);
Expand Down

0 comments on commit 6f6766c

Please sign in to comment.