Skip to content

Commit df70fd0

Browse files
committed
SpotBugs annotation
1 parent f95f8e4 commit df70fd0

File tree

1 file changed

+4
-0
lines changed
  • dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc

1 file changed

+4
-0
lines changed

dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import datadog.trace.bootstrap.instrumentation.jdbc.DBInfo;
2020
import datadog.trace.bootstrap.instrumentation.jdbc.DBQueryInfo;
2121
import datadog.trace.bootstrap.instrumentation.jdbc.JDBCConnectionUrlParser;
22+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2223
import java.nio.ByteBuffer;
2324
import java.nio.ByteOrder;
2425
import java.sql.Connection;
@@ -328,6 +329,9 @@ public long setContextInfo(Connection connection, DBInfo dbInfo) {
328329
* @param span The span of the instrumented statement
329330
* @param connection The same connection as the one that will be used for the actual statement
330331
*/
332+
@SuppressFBWarnings(
333+
value = "SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE",
334+
justification = "Prepared statement not possible with SET")
331335
public void setApplicationName(AgentSpan span, Connection connection) {
332336
final long startTime = System.currentTimeMillis();
333337
try {

0 commit comments

Comments
 (0)