Skip to content

Commit

Permalink
NH-93969: remove stored procedure instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Oct 21, 2024
1 parent 5c80707 commit 4da5694
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ public ElementMatcher<TypeDescription> typeMatcher() {
@Override
public void transform(TypeTransformer transformer) {
transformer.applyAdviceToMethod(
nameStartsWith("prepare")
.and(takesArgument(0, String.class))
// Also include CallableStatement, which is a subtype of PreparedStatement
.and(returns(implementsInterface(named("java.sql.PreparedStatement")))),
named("prepareCall")
.and(takesArgument(0, String.class).and(takesArgument(1, int.class)))
.and(returns(implementsInterface(named("java.sql.PreparedStatement"))))
.or(
named("prepareStatement")
.and(takesArgument(0, String.class))
.and(returns(implementsInterface(named("java.sql.PreparedStatement"))))),
JdbcConnectionInstrumentation.class.getName() + "$PrepareAdvice");
}

Expand Down

0 comments on commit 4da5694

Please sign in to comment.