Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use errorprone 2.4.0 #1951

Merged
merged 1 commit into from Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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