Skip to content

Commit

Permalink
Remove extra blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 26, 2023
1 parent 39b2c59 commit 1fbad02
Show file tree
Hide file tree
Showing 29 changed files with 0 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1772,5 +1772,4 @@ final void updateStatsReturn(final Duration activeTime) {
activeTimes.add(activeTime);
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ public abstract class BaseObjectPoolConfig<T> extends BaseObject implements Clon

private String jmxNameBase = DEFAULT_JMX_NAME_BASE;


/**
* Gets the value for the {@code blockWhenExhausted} configuration attribute
* for pools created with this configuration instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,5 +296,4 @@ public void use() {
usedBy.fillInStackTrace();
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public long getLastBorrowTime() {
return pooledObject.getLastBorrowInstant().toEpochMilli();
}


@Override
public String getLastBorrowTimeFormatted() {
return getTimeMillisFormatted(getLastBorrowTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;


/**
* Provides a shared idle object eviction timer for all pools.
* <p>
Expand Down Expand Up @@ -120,7 +119,6 @@ public void run() {
}
}


/** Executor instance */
private static ScheduledThreadPoolExecutor executor; //@GuardedBy("EvictionTimer.class")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public String toString() {
private volatile int minIdlePerKey =
GenericKeyedObjectPoolConfig.DEFAULT_MIN_IDLE_PER_KEY;


private volatile int maxTotalPerKey =
GenericKeyedObjectPoolConfig.DEFAULT_MAX_TOTAL_PER_KEY;

Expand Down Expand Up @@ -237,7 +236,6 @@ public String toString() {

private Iterator<K> evictionKeyIterator; // @GuardedBy("evictionLock")


private K evictionKey; // @GuardedBy("evictionLock")

/**
Expand Down Expand Up @@ -681,7 +679,6 @@ public void clearOldest() {
}
}


/**
* Closes the keyed object pool. Once the pool is closed,
* {@link #borrowObject(Object)} will fail with IllegalStateException, but
Expand Down Expand Up @@ -721,7 +718,6 @@ public void close() {
}
}


/**
* Creates a new pooled object or null.
*
Expand Down Expand Up @@ -913,7 +909,6 @@ private boolean destroy(final K key, final PooledObject<T> toDestroy, final bool
}
}


@Override
void ensureMinIdle() throws E {
final int minIdlePerKeySave = getMinIdlePerKey();
Expand Down Expand Up @@ -1114,7 +1109,6 @@ public void evict() throws E {
}
}


/**
* Gets a reference to the factory used to create, destroy and validate
* the objects used by this pool.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public class GenericKeyedObjectPoolConfig<T> extends BaseObjectPoolConfig<T> {
*/
public static final int DEFAULT_MAX_IDLE_PER_KEY = 8;


private int minIdlePerKey = DEFAULT_MIN_IDLE_PER_KEY;

private int maxIdlePerKey = DEFAULT_MAX_IDLE_PER_KEY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class GenericObjectPoolConfig<T> extends BaseObjectPoolConfig<T> {
*/
public static final int DEFAULT_MIN_IDLE = 0;


private int maxTotal = DEFAULT_MAX_TOTAL;

private int maxIdle = DEFAULT_MAX_IDLE;
Expand Down Expand Up @@ -78,7 +77,6 @@ public int getMaxIdle() {
return maxIdle;
}


/**
* Gets the value for the {@code maxTotal} configuration attribute
* for pools created with this configuration instance.
Expand All @@ -105,7 +103,6 @@ public int getMinIdle() {
return minIdle;
}


/**
* Sets the value for the {@code maxIdle} configuration attribute for
* pools created with this configuration instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,6 @@ public LinkedBlockingDeque(final boolean fairness) {
this(Integer.MAX_VALUE, fairness);
}


// Basic linking and unlinking operations, called only while holding lock

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public class SoftReferenceObjectPool<T, E extends Exception> extends BaseObjectP
/** Total number of instances that have been destroyed */
private long destroyCount; // @GuardedBy("this")


/** Total number of instances that have been created */
private long createCount; // @GuardedBy("this")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class BaseProxyHandler<T> {
private volatile T pooledObject;
private final UsageTracking<T> usageTracking;


/**
* Constructs a new wrapper for the given pooled object.
*
Expand All @@ -47,7 +46,6 @@ class BaseProxyHandler<T> {
this.usageTracking = usageTracking;
}


/**
* Disable the proxy wrapper. Called when the object has been returned to
* the pool. Further use of the wrapper should result in an
Expand All @@ -61,7 +59,6 @@ T disableProxy() {
return result;
}


/**
* Invoke the given method on the wrapped object.
*
Expand All @@ -79,7 +76,6 @@ Object doInvoke(final Method method, final Object[] args) throws Throwable {
return method.invoke(object, args);
}


/**
* Gets the wrapped, pooled object.
*
Expand All @@ -89,7 +85,6 @@ T getPooledObject() {
return pooledObject;
}


/**
* @since 2.4.3
*/
Expand All @@ -105,7 +100,6 @@ public String toString() {
return builder.toString();
}


/**
* Check that the proxy is still valid (i.e. that {@link #disableProxy()}
* has not been called).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
final class CglibProxyHandler<T> extends BaseProxyHandler<T>
implements MethodInterceptor {


/**
* Constructs a CGLib proxy instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public T createProxy(final T pooledObject, final UsageTracking<T> usageTracking)
return (T) enhancer.create();
}


@Override
public T resolveProxy(final T proxy) {
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ final class JdkProxyHandler<T> extends BaseProxyHandler<T>
super(pooledObject, usageTracking);
}


@Override
public Object invoke(final Object proxy, final Method method, final Object[] args)
throws Throwable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class ProxiedKeyedObjectPool<K, V, E extends Exception> implements KeyedO
private final KeyedObjectPool<K, V, E> pool;
private final ProxySource<V> proxySource;


/**
* Constructs a new proxied object pool.
*
Expand All @@ -52,7 +51,6 @@ public ProxiedKeyedObjectPool(final KeyedObjectPool<K, V, E> pool,
this.proxySource = proxySource;
}


@Override
public void addObject(final K key) throws E, IllegalStateException,
UnsupportedOperationException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class ProxiedObjectPool<T, E extends Exception> implements ObjectPool<T,
private final ObjectPool<T, E> pool;
private final ProxySource<T> proxySource;


/**
* Constructs a new proxied object pool.
*
Expand All @@ -54,7 +53,6 @@ public void addObject() throws E, IllegalStateException, UnsupportedOperationExc
pool.addObject();
}


@SuppressWarnings("unchecked")
@Override
public T borrowObject() throws E, NoSuchElementException, IllegalStateException {
Expand All @@ -65,37 +63,31 @@ public T borrowObject() throws E, NoSuchElementException, IllegalStateException
return proxySource.createProxy(pool.borrowObject(), usageTracking);
}


@Override
public void clear() throws E, UnsupportedOperationException {
pool.clear();
}


@Override
public void close() {
pool.close();
}


@Override
public int getNumActive() {
return pool.getNumActive();
}


@Override
public int getNumIdle() {
return pool.getNumIdle();
}


@Override
public void invalidateObject(final T proxy) throws E {
pool.invalidateObject(proxySource.resolveProxy(proxy));
}


@Override
public void returnObject(final T proxy) throws E {
pool.returnObject(proxySource.resolveProxy(proxy));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ public void testKPOFBorrowObjectUsages() {
expectedMethods.add(new MethodCall("makeObject", KEY));
assertEquals(expectedMethods, factory.getMethodCalls());


// when activateObject fails in borrowObject, a new object should be borrowed/created
reset(pool, factory, expectedMethods);
pool.addObject(KEY);
Expand Down Expand Up @@ -637,7 +636,6 @@ public void testKPOFClearUsages() {
pool.close();
}


@Test
public void testKPOFCloseUsages() {
final FailingKeyedPooledObjectFactory factory = new FailingKeyedPooledObjectFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.commons.pool3;


import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -198,7 +197,6 @@ public void testPOFBorrowObjectUsages() throws Exception {
expectedMethods.add(new MethodCall("makeObject"));
assertEquals(expectedMethods, factory.getMethodCalls());


// when activateObject fails in borrowObject, a new object should be borrowed/created
reset(pool, factory, expectedMethods);
pool.addObject();
Expand Down Expand Up @@ -273,7 +271,6 @@ public void testPOFCloseUsages() throws Exception {
pool.addObjects(5);
pool.close();


// Test exception handling close should swallow failures
try {
pool = makeEmptyPool(factory);
Expand Down
1 change: 0 additions & 1 deletion src/test/java/org/apache/commons/pool3/PoolTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.apache.commons.pool3;


import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,33 @@ public void setCreateLatency(final long createLatency) {
this.createLatency = createLatency;
}


/**
* @param destroyLatency the destroyLatency to set
*/
public void setDestroyLatency(final long destroyLatency) {
this.destroyLatency = destroyLatency;
}


/**
* @param passivateLatency the passivateLatency to set
*/
public void setPassivateLatency(final long passivateLatency) {
this.passivateLatency = passivateLatency;
}


/**
* @param validateLatency the validateLatency to set
*/
public void setValidateLatency(final long validateLatency) {
this.validateLatency = validateLatency;
}


@Override
public boolean validateObject(final PooledObject<AtomicInteger> instance) {
Waiter.sleepQuietly(validateLatency);
return instance.getObject().intValue() == 1;
}


@Override
public PooledObject<AtomicInteger> wrap(final AtomicInteger integer) {
return new DefaultPooledObject<>(integer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.commons.pool3.impl;


import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
Expand Down
Loading

0 comments on commit 1fbad02

Please sign in to comment.