Skip to content

Commit 0df317d

Browse files
committed
fix errorprone warnings
1 parent e9c01db commit 0df317d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
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

0 commit comments

Comments
 (0)