fix jdbc plugin issue

This commit is contained in:
ascrutae 2017-09-01 12:12:21 +08:00
parent 61b4a080b7
commit 0baf691ae4
1 changed files with 6 additions and 2 deletions

View File

@ -23,8 +23,12 @@ public class JDBCDriverInterceptor implements InstanceMethodsAroundInterceptor {
@Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments,
Class<?>[] argumentsTypes, Object ret) throws Throwable {
return new SWConnection((String)allArguments[0],
(Properties)allArguments[1], (Connection)ret);
if (ret != null) {
return new SWConnection((String)allArguments[0],
(Properties)allArguments[1], (Connection)ret);
}
return ret;
}
@Override public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments,