mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Fix obvious mistakes like spelling errors
This commit is contained in:
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
package com.alibaba.druid.pool;
|
||||
|
||||
import com.alibaba.druid.proxy.jdbc.WrapperProxy;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Wrapper;
|
||||
|
||||
import com.alibaba.druid.proxy.jdbc.WrapperProxy;
|
||||
|
||||
/**
|
||||
* @author wenshao<szujobs@hotmail.com>
|
||||
*/
|
||||
@@ -33,11 +33,17 @@ public class PoolableWrapper implements Wrapper {
|
||||
|
||||
@Override
|
||||
public boolean isWrapperFor(Class<?> iface) throws SQLException {
|
||||
|
||||
if (null == wrapper) {
|
||||
//Best to log error.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (iface == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wrapper != null && iface == wrapper.getClass()) {
|
||||
if (iface == wrapper.getClass()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -57,11 +63,17 @@ public class PoolableWrapper implements Wrapper {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException {
|
||||
|
||||
if (null == wrapper) {
|
||||
//Best to log error.
|
||||
return null;
|
||||
}
|
||||
|
||||
if (iface == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (wrapper != null && iface == wrapper.getClass()) {
|
||||
if (iface == wrapper.getClass()) {
|
||||
return (T) wrapper;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user