File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,6 @@ public long setContextInfo(Connection connection, DBInfo dbInfo) {
267267 AgentTracer .get ().buildSpan ("set context_info" ).withTag ("dd.instrumentation" , true ).start ();
268268 DECORATE .afterStart (instrumentationSpan );
269269 DECORATE .onConnection (instrumentationSpan , dbInfo );
270- PreparedStatement instrumentationStatement = null ;
271270 try (AgentScope scope = activateSpan (instrumentationSpan )) {
272271 final byte samplingDecision =
273272 (byte ) (instrumentationSpan .forceSamplingDecision () > 0 ? 1 : 0 );
@@ -284,9 +283,8 @@ public long setContextInfo(Connection connection, DBInfo dbInfo) {
284283 byteBuffer .putLong (traceId .toLong ());
285284 final byte [] contextInfo = byteBuffer .array ();
286285 String instrumentationSql = "set context_info ?" ;
287- try (PreparedStatement instrumentStatement =
286+ try (PreparedStatement instrumentationStatement =
288287 connection .prepareStatement (instrumentationSql )) {
289- instrumentationStatement = connection .prepareStatement (instrumentationSql );
290288 instrumentationStatement .setBytes (1 , contextInfo );
291289 DECORATE .onStatement (instrumentationSpan , instrumentationSql );
292290 instrumentationStatement .execute ();
You can’t perform that action at this time.
0 commit comments