Whitespace correction.

pull/77/head
Brett Wooldridge 11 years ago
parent 719da54897
commit 88473ad07c

@ -49,22 +49,22 @@ public final class JavassistProxyFactory
static static
{ {
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
try try
{ {
Thread.currentThread().setContextClassLoader(JavassistProxyFactory.class.getClassLoader()); Thread.currentThread().setContextClassLoader(JavassistProxyFactory.class.getClassLoader());
JavassistProxyFactory proxyFactoryFactory = new JavassistProxyFactory(); JavassistProxyFactory proxyFactoryFactory = new JavassistProxyFactory();
proxyFactoryFactory.modifyProxyFactory(); proxyFactoryFactory.modifyProxyFactory();
} }
catch (Exception e) catch (Exception e)
{ {
LoggerFactory.getLogger(JavassistProxyFactory.class).error("Fatal exception during proxy generation", e); LoggerFactory.getLogger(JavassistProxyFactory.class).error("Fatal exception during proxy generation", e);
throw new RuntimeException(e); throw new RuntimeException(e);
} }
finally finally
{ {
Thread.currentThread().setContextClassLoader(contextClassLoader); Thread.currentThread().setContextClassLoader(contextClassLoader);
} }
} }

@ -32,7 +32,7 @@ public abstract class StatementProxy implements Statement
protected final Statement delegate; protected final Statement delegate;
private boolean isClosed; private boolean isClosed;
protected StatementProxy(IHikariConnectionProxy connection, Statement statement) protected StatementProxy(IHikariConnectionProxy connection, Statement statement)
{ {
this.connection = connection; this.connection = connection;
@ -44,7 +44,6 @@ public abstract class StatementProxy implements Statement
connection.checkException(e); connection.checkException(e);
} }
// ********************************************************************** // **********************************************************************
// Overridden java.sql.Statement Methods // Overridden java.sql.Statement Methods
// ********************************************************************** // **********************************************************************
@ -124,8 +123,8 @@ public abstract class StatementProxy implements Statement
return connection; return connection;
} }
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public final <T> T unwrap(Class<T> iface) throws SQLException public final <T> T unwrap(Class<T> iface) throws SQLException
{ {
if (iface.isInstance(delegate)) if (iface.isInstance(delegate))

@ -154,14 +154,14 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
*/ */
public void requite(final T value) public void requite(final T value)
{ {
if (value == null) if (value == null)
{ {
throw new NullPointerException("Cannot return a null value to the bag"); throw new NullPointerException("Cannot return a null value to the bag");
} }
if (value.compareAndSetState(STATE_IN_USE, STATE_NOT_IN_USE)) if (value.compareAndSetState(STATE_IN_USE, STATE_NOT_IN_USE))
{ {
LinkedList<WeakReference<T>> list = threadList.get(); LinkedList<WeakReference<T>> list = threadList.get();
if (list == null) if (list == null)
{ {
list = new LinkedList<WeakReference<T>>(); list = new LinkedList<WeakReference<T>>();
@ -200,14 +200,14 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
{ {
if (value.compareAndSetState(STATE_IN_USE, STATE_REMOVED) || value.compareAndSetState(STATE_RESERVED, STATE_REMOVED)) if (value.compareAndSetState(STATE_IN_USE, STATE_REMOVED) || value.compareAndSetState(STATE_RESERVED, STATE_REMOVED))
{ {
if (!sharedList.remove(value)) if (!sharedList.remove(value))
{ {
throw new IllegalStateException("Attempt to remove an object from the bag that does not exist"); throw new IllegalStateException("Attempt to remove an object from the bag that does not exist");
} }
} }
else else
{ {
throw new IllegalStateException("Attempt to remove an object from the bag that was not borrowed or reserved"); throw new IllegalStateException("Attempt to remove an object from the bag that was not borrowed or reserved");
} }
} }
@ -225,13 +225,13 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
ArrayList<T> list = new ArrayList<T>(sharedList.size()); ArrayList<T> list = new ArrayList<T>(sharedList.size());
if (state == STATE_IN_USE || state == STATE_NOT_IN_USE) if (state == STATE_IN_USE || state == STATE_NOT_IN_USE)
{ {
for (T reference : sharedList) for (T reference : sharedList)
{ {
if (reference.getState() == state) if (reference.getState() == state)
{ {
list.add(reference); list.add(reference);
} }
} }
} }
return list; return list;
} }
@ -264,7 +264,7 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
final long checkInTime = System.nanoTime(); final long checkInTime = System.nanoTime();
if (!value.compareAndSetState(STATE_RESERVED, STATE_NOT_IN_USE)) if (!value.compareAndSetState(STATE_RESERVED, STATE_NOT_IN_USE))
{ {
throw new IllegalStateException("Attempt to relinquish an object to the bag that was not reserved"); throw new IllegalStateException("Attempt to relinquish an object to the bag that was not reserved");
} }
synchronizer.releaseShared(checkInTime); synchronizer.releaseShared(checkInTime);

Loading…
Cancel
Save