Merge pull request #79 from openwide-java/various-fixes

Various fixes.  Thanks.
pull/84/head
Brett Wooldridge 11 years ago
commit b719311bd1

@ -190,7 +190,7 @@ public class HikariDataSource extends HikariConfig implements DataSource
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException
{
return (pool != null & pool.getDataSource().getClass().isAssignableFrom(iface));
return (pool != null && pool.getDataSource().getClass().isAssignableFrom(iface));
}
/**

@ -64,7 +64,6 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private volatile long lastAccess;
private long uncloseTime;
private StackTraceElement[] leakTrace;
private TimerTask leakTask;
private final int hashCode;
@ -126,7 +125,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
public final void captureStack(long leakDetectionThreshold, Timer scheduler)
{
StackTraceElement[] trace = Thread.currentThread().getStackTrace();
leakTrace = new StackTraceElement[trace.length - 4];
StackTraceElement[] leakTrace = new StackTraceElement[trace.length - 4];
System.arraycopy(trace, 4, leakTrace, 0, leakTrace.length);
leakTask = new LeakTask(leakTrace, leakDetectionThreshold);

@ -22,6 +22,7 @@ import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
@ -46,10 +47,10 @@ public final class PropertyBeanSetter
return;
}
for (Object propKey : properties.keySet())
for (Entry<Object, Object> propEntry : properties.entrySet())
{
String propName = propKey.toString();
Object propValue = properties.get(propKey);
String propName = propEntry.getKey().toString();
Object propValue = propEntry.getValue();
if (target instanceof HikariConfig && propName.startsWith("dataSource."))
{

Loading…
Cancel
Save