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

Bump versions.errorprone from 2.5.1 to 2.6.0 #2250

Merged
merged 2 commits into from Apr 1, 2021
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.20'
versions.junitJupiter = '5.7.1'
versions.errorprone = '2.5.1'
versions.errorprone = '2.6.0'

libraries.junit4 = 'junit:junit:4.13.2'
libraries.junitJupiterApi = "org.junit.jupiter:junit-jupiter-api:${versions.junitJupiter}"
Expand Down
Expand Up @@ -117,16 +117,22 @@ public void multiple_empty_implementations() throws Exception {

@Test
public void problems_loading_impl() throws Exception {
String fileName = "xxx";
File f = tmp.newFile(fileName);

// when
IOUtil.writeText("Bar", f);

when(switcher.isEnabled(anyString())).thenThrow(new RuntimeException("Boo!"));

try {
// when
finder.findPluginClass(asList(new File("xxx").toURI().toURL()));
finder.findPluginClass(asList(f.toURI().toURL()));
// then
fail();
} catch (Exception e) {
assertThat(e).hasMessageContaining("xxx");
e.getCause().getMessage().equals("Boo!");
assertThat(e).hasMessageContaining(fileName);
assertThat(e.getCause()).hasMessage("Boo!");
}
}
}
Expand Up @@ -8,7 +8,6 @@

import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
import com.google.errorprone.BugPattern.ProvidesFix;
import com.google.errorprone.BugPattern.SeverityLevel;
import com.google.errorprone.VisitorState;
import com.google.errorprone.bugpatterns.BugChecker;
Expand Down Expand Up @@ -38,8 +37,7 @@
+ " https://www.javadoc.io/doc/org.mockito/mockito-core/. If you believe that there"
+ " is no replacement available in the public API for your use-case, contact the"
+ " Mockito team at https://github.com/mockito/mockito/issues.",
severity = SeverityLevel.WARNING,
providesFix = ProvidesFix.REQUIRES_HUMAN_ATTENTION)
severity = SeverityLevel.WARNING)
public class MockitoInternalUsage extends BugChecker implements MemberSelectTreeMatcher {

private static final Matcher<Tree> INSIDE_MOCKITO = packageStartsWith("org.mockito");
Expand Down