Make the things we can private and final.

pull/22/head
Brett Wooldridge 11 years ago
parent 385fc4510d
commit 1fa249cf16

@ -40,18 +40,19 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private static final Set<String> SQL_ERRORS; private static final Set<String> SQL_ERRORS;
protected final ArrayList<Statement> openStatements;
protected final HikariPool _parentPool;
protected final Connection delegate; protected final Connection delegate;
protected final ThreadLocal<Boolean> isClosed; private final ArrayList<Statement> openStatements;
private final HikariPool _parentPool;
private final ThreadLocal<Boolean> isClosed;
protected boolean _forceClose; private final long _creationTime;
protected long _creationTime; private boolean _forceClose;
protected long _lastAccess; private long _lastAccess;
protected StackTraceElement[] _stackTrace; private StackTraceElement[] _stackTrace;
protected TimerTask _leakTask; private TimerTask _leakTask;
// static initializer // static initializer
static static
@ -74,8 +75,6 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
openStatements = new ArrayList<Statement>(64); openStatements = new ArrayList<Statement>(64);
_creationTime = _lastAccess = System.currentTimeMillis(); _creationTime = _lastAccess = System.currentTimeMillis();
isClosed = new ThreadLocal<Boolean>() { isClosed = new ThreadLocal<Boolean>() {
/** {@inheritDoc} */
@Override
protected Boolean initialValue() protected Boolean initialValue()
{ {
return Boolean.FALSE; return Boolean.FALSE;
@ -151,7 +150,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
} }
} }
protected final <T extends Statement> T trackStatement(T statement) private final <T extends Statement> T trackStatement(T statement)
{ {
openStatements.add(statement); openStatements.add(statement);

Loading…
Cancel
Save