java.sql classes are not always present

This commit is contained in:
Laplie Anderson 2019-08-22 13:00:07 -04:00
parent fa378e16d3
commit 3323bbc5b1
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public final class ConnectionInstrumentation extends Instrumenter.Default {
nameStartsWith("prepare") nameStartsWith("prepare")
.and(takesArgument(0, String.class)) .and(takesArgument(0, String.class))
// Also include CallableStatement, which is a sub type of PreparedStatement // Also include CallableStatement, which is a sub type of PreparedStatement
.and(returns(safeHasSuperType(named(PreparedStatement.class.getName())))), .and(returns(safeHasSuperType(named("java.sql.PreparedStatement")))),
ConnectionPrepareAdvice.class.getName()); ConnectionPrepareAdvice.class.getName());
} }

View File

@ -54,7 +54,7 @@ public final class DriverInstrumentation extends Instrumenter.Default {
nameStartsWith("connect") nameStartsWith("connect")
.and(takesArgument(0, String.class)) .and(takesArgument(0, String.class))
.and(takesArgument(1, Properties.class)) .and(takesArgument(1, Properties.class))
.and(returns(Connection.class)), .and(returns(named("java.sql.Connection"))),
DriverAdvice.class.getName()); DriverAdvice.class.getName());
} }