Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@ private static Long getAwsStatusCode(SpanData spanData) {
Throwable throwable = exceptionEvent.getException();

try {
Method method = throwable.getClass().getMethod("getStatusCode", new Class<?>[] {});
Object code = method.invoke(throwable, new Object[] {});
Method method = throwable.getClass().getMethod("getStatusCode");
Object code = method.invoke(throwable);
return Long.valueOf((Integer) code);
} catch (Exception e) {
// Take no action
}

try {
Method method = throwable.getClass().getMethod("statusCode", new Class<?>[] {});
Object code = method.invoke(throwable, new Object[] {});
Method method = throwable.getClass().getMethod("statusCode");
Object code = method.invoke(throwable);
return Long.valueOf((Integer) code);
} catch (Exception e) {
// Take no action
Expand Down
4 changes: 2 additions & 2 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ dependencies {
api("com.google.auto.service:auto-service-annotations:1.1.1")
api("com.google.auto.value:auto-value:1.11.0")
api("com.google.auto.value:auto-value-annotations:1.11.0")
api("com.google.errorprone:error_prone_annotations:2.41.0")
api("com.google.errorprone:error_prone_core:2.41.0")
api("com.google.errorprone:error_prone_annotations:2.42.0")
api("com.google.errorprone:error_prone_core:2.42.0")
api("io.github.netmikey.logunit:logunit-jul:2.0.0")
api("io.opentelemetry.proto:opentelemetry-proto:1.8.0-alpha")
api("io.prometheus:simpleclient:0.16.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void transform() throws Exception {
mBeanHelper.fetch();

assertThat(mBeanHelper.getAttribute("SomeAttribute"))
.hasSameElementsAs(Stream.of(new String[] {"otherValue"}).collect(Collectors.toList()));
.hasSameElementsAs(Stream.of("otherValue").collect(Collectors.toList()));
}

@Test
Expand Down Expand Up @@ -169,10 +169,9 @@ void transformMultipleAttributes() throws Exception {
mBeanHelper.fetch();

assertThat(mBeanHelper.getAttribute("SomeAttribute"))
.hasSameElementsAs(Stream.of(new String[] {"newValue"}).collect(Collectors.toList()));
.hasSameElementsAs(Stream.of("newValue").collect(Collectors.toList()));
assertThat(mBeanHelper.getAttribute("AnotherAttribute"))
.hasSameElementsAs(
Stream.of(new String[] {"anotherNewValue"}).collect(Collectors.toList()));
.hasSameElementsAs(Stream.of("anotherNewValue").collect(Collectors.toList()));
}

@Test
Expand All @@ -190,7 +189,7 @@ void customAttribute() throws Exception {
mBeanHelper.fetch();

assertThat(mBeanHelper.getAttribute("CustomAttribute"))
.hasSameElementsAs(Stream.of(new String[] {"customValue"}).collect(Collectors.toList()));
.hasSameElementsAs(Stream.of("customValue").collect(Collectors.toList()));
}

private static void registerThings(String thingName) throws Exception {
Expand Down
Loading