Skip to content

Commit 4d9694d

Browse files
otelbot-java-instrumentation[bot]otelbot[bot]Copilot
authored
Module cleanup: batch of 3 modules (run 25754163536) (#18718)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b791222 commit 4d9694d

3 files changed

Lines changed: 4 additions & 14 deletions

File tree

instrumentation/java-util-logging/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/jul/JavaUtilLoggingTest.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,7 @@ private interface LoggerMethod {
165165
void call(Logger logger, String msg);
166166
}
167167

168-
private static String experimental(String value) {
169-
if (EXPERIMENTAL_ATTRIBUTES) {
170-
return value;
171-
}
172-
return null;
173-
}
174-
175-
private static Long experimental(long value) {
176-
if (EXPERIMENTAL_ATTRIBUTES) {
177-
return value;
178-
}
179-
return null;
168+
private static <T> T experimental(T value) {
169+
return EXPERIMENTAL_ATTRIBUTES ? value : null;
180170
}
181171
}

instrumentation/jaxrs-client/jaxrs-client-1.1-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/JaxRsClientV1Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public WebResource.Builder buildRequest(String method, URI uri, Map<String, Stri
8181
public int sendRequest(
8282
WebResource.Builder builder, String method, URI uri, Map<String, String> headers)
8383
throws Exception {
84-
String body = "POST".equals(method) || "PUT".equals(method) ? "" : null;
84+
String body = method.equals("POST") || method.equals("PUT") ? "" : null;
8585
try {
8686
return builder.method(method, ClientResponse.class, body).getStatus();
8787
} catch (ClientHandlerException e) {

instrumentation/jaxrs-client/jaxrs-client-2.0-testing/src/test/java/io/opentelemetry/javaagent/instrumentation/jaxrsclient/JaxMultithreadedClientTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ boolean checkUri(JerseyClientBuilder builder, URI uri) {
4646
try {
4747
client.target(uri).request().get().close();
4848
return false;
49-
} catch (Exception e) {
49+
} catch (Exception ignored) {
5050
return true;
5151
} finally {
5252
client.close();

0 commit comments

Comments
 (0)