fix(deps): update errorproneversion to v2.22.0 (#9535)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
This commit is contained in:
renovate[bot] 2023-09-22 08:32:57 +00:00 committed by GitHub
parent 7d2259742a
commit 40011e6d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 7 deletions

View File

@ -9,10 +9,12 @@ import static com.google.errorprone.matchers.Description.NO_MATCH;
import com.google.auto.service.AutoService;
import com.google.errorprone.BugPattern;
import com.google.errorprone.ErrorProneFlags;
import com.google.errorprone.VisitorState;
import com.google.errorprone.bugpatterns.BugChecker;
import com.google.errorprone.bugpatterns.checkreturnvalue.CanIgnoreReturnValueSuggester;
import com.google.errorprone.matchers.Description;
import com.google.inject.Inject;
import com.sun.source.tree.ClassTree;
import com.sun.source.tree.MethodTree;
import com.sun.source.util.TreePath;
@ -27,7 +29,19 @@ public class OtelCanIgnoreReturnValueSuggester extends BugChecker
private static final long serialVersionUID = 1L;
private final CanIgnoreReturnValueSuggester delegate = new CanIgnoreReturnValueSuggester();
private final CanIgnoreReturnValueSuggester delegate;
@Inject
OtelCanIgnoreReturnValueSuggester(ErrorProneFlags errorProneFlags) {
delegate = new CanIgnoreReturnValueSuggester(errorProneFlags);
}
public OtelCanIgnoreReturnValueSuggester() {
// https://errorprone.info/docs/plugins
// this constructor is used by ServiceLoader, actual instance will be created with the other
// constructor
delegate = null;
}
@Override
public Description matchMethod(MethodTree methodTree, VisitorState visitorState) {

View File

@ -39,7 +39,7 @@ val DEPENDENCY_BOMS = listOf(
val autoServiceVersion = "1.1.1"
val autoValueVersion = "1.10.4"
val errorProneVersion = "2.21.1"
val errorProneVersion = "2.22.0"
val byteBuddyVersion = "1.14.8"
val asmVersion = "9.5"
val jmhVersion = "1.37"

View File

@ -100,7 +100,7 @@ class KubernetesClientTest {
void handleErrorsInSyncCall() {
mockWebServer.enqueue(
HttpResponse.of(HttpStatus.valueOf(451), MediaType.PLAIN_TEXT_UTF_8, "42"));
AtomicReference<ApiException> apiExceptionReference = new AtomicReference<>(null);
ApiException exception = null;
try {
testing.runWithSpan(
"parent",
@ -108,13 +108,12 @@ class KubernetesClientTest {
coreV1Api.connectGetNamespacedPodProxy("name", "namespace", "path");
});
} catch (ApiException e) {
apiExceptionReference.set(e);
exception = e;
}
assertThat(apiExceptionReference.get()).isNotNull();
ApiException apiException = exception;
assertThat(apiException).isNotNull();
assertThat(mockWebServer.takeRequest().request().headers().get("traceparent")).isNotBlank();
ApiException apiException = apiExceptionReference.get();
testing.waitAndAssertTraces(
trace ->
trace.hasSpansSatisfyingExactly(