Skip to content

Commit 88cde77

Browse files
fix(deps): update errorprone packages to v2.42.0 (#2289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lauri Tulmin <[email protected]>
1 parent cabc954 commit 88cde77

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

aws-xray/src/main/java/io/opentelemetry/contrib/awsxray/AwsSpanMetricsProcessor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,16 @@ private static Long getAwsStatusCode(SpanData spanData) {
153153
Throwable throwable = exceptionEvent.getException();
154154

155155
try {
156-
Method method = throwable.getClass().getMethod("getStatusCode", new Class<?>[] {});
157-
Object code = method.invoke(throwable, new Object[] {});
156+
Method method = throwable.getClass().getMethod("getStatusCode");
157+
Object code = method.invoke(throwable);
158158
return Long.valueOf((Integer) code);
159159
} catch (Exception e) {
160160
// Take no action
161161
}
162162

163163
try {
164-
Method method = throwable.getClass().getMethod("statusCode", new Class<?>[] {});
165-
Object code = method.invoke(throwable, new Object[] {});
164+
Method method = throwable.getClass().getMethod("statusCode");
165+
Object code = method.invoke(throwable);
166166
return Long.valueOf((Integer) code);
167167
} catch (Exception e) {
168168
// Take no action

dependencyManagement/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ dependencies {
2727
api("com.google.auto.service:auto-service-annotations:1.1.1")
2828
api("com.google.auto.value:auto-value:1.11.0")
2929
api("com.google.auto.value:auto-value-annotations:1.11.0")
30-
api("com.google.errorprone:error_prone_annotations:2.41.0")
31-
api("com.google.errorprone:error_prone_core:2.41.0")
30+
api("com.google.errorprone:error_prone_annotations:2.42.0")
31+
api("com.google.errorprone:error_prone_core:2.42.0")
3232
api("io.github.netmikey.logunit:logunit-jul:2.0.0")
3333
api("io.opentelemetry.proto:opentelemetry-proto:1.8.0-alpha")
3434
api("io.prometheus:simpleclient:0.16.0")

jmx-metrics/src/test/java/io/opentelemetry/contrib/jmxmetrics/MBeanHelperTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void transform() throws Exception {
141141
mBeanHelper.fetch();
142142

143143
assertThat(mBeanHelper.getAttribute("SomeAttribute"))
144-
.hasSameElementsAs(Stream.of(new String[] {"otherValue"}).collect(Collectors.toList()));
144+
.hasSameElementsAs(Stream.of("otherValue").collect(Collectors.toList()));
145145
}
146146

147147
@Test
@@ -169,10 +169,9 @@ void transformMultipleAttributes() throws Exception {
169169
mBeanHelper.fetch();
170170

171171
assertThat(mBeanHelper.getAttribute("SomeAttribute"))
172-
.hasSameElementsAs(Stream.of(new String[] {"newValue"}).collect(Collectors.toList()));
172+
.hasSameElementsAs(Stream.of("newValue").collect(Collectors.toList()));
173173
assertThat(mBeanHelper.getAttribute("AnotherAttribute"))
174-
.hasSameElementsAs(
175-
Stream.of(new String[] {"anotherNewValue"}).collect(Collectors.toList()));
174+
.hasSameElementsAs(Stream.of("anotherNewValue").collect(Collectors.toList()));
176175
}
177176

178177
@Test
@@ -190,7 +189,7 @@ void customAttribute() throws Exception {
190189
mBeanHelper.fetch();
191190

192191
assertThat(mBeanHelper.getAttribute("CustomAttribute"))
193-
.hasSameElementsAs(Stream.of(new String[] {"customValue"}).collect(Collectors.toList()));
192+
.hasSameElementsAs(Stream.of("customValue").collect(Collectors.toList()));
194193
}
195194

196195
private static void registerThings(String thingName) throws Exception {

0 commit comments

Comments
 (0)