From 2a4532840a497641263e46dda7c5e58e0ee67f0c Mon Sep 17 00:00:00 2001 From: Nenad Noveljic <18366081+nenadnoveljic@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:23:06 +0100 Subject: [PATCH] SpotBugs annotation --- .../datadog/trace/instrumentation/jdbc/JDBCDecorator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java b/dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java index cde56cb060a..31bd9ce9ac4 100644 --- a/dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java +++ b/dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java @@ -19,6 +19,7 @@ import datadog.trace.bootstrap.instrumentation.jdbc.DBInfo; import datadog.trace.bootstrap.instrumentation.jdbc.DBQueryInfo; import datadog.trace.bootstrap.instrumentation.jdbc.JDBCConnectionUrlParser; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.sql.Connection; @@ -328,6 +329,9 @@ public long setContextInfo(Connection connection, DBInfo dbInfo) { * @param span The span of the instrumented statement * @param connection The same connection as the one that will be used for the actual statement */ + @SuppressFBWarnings( + value = "SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE", + justification = "Prepared statement not possible with SET") public void setApplicationName(AgentSpan span, Connection connection) { final long startTime = System.currentTimeMillis(); try {