Skip to content

Commit

Permalink
No _ in private variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 17, 2023
1 parent 5aebe09 commit f1ae4ee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/java/org/apache/commons/pool3/ObjectPoolIssue326.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public PooledObject<Object> wrap(final Object o) {
}

private static final class Task<E extends Exception> implements Callable<Object> {
private final GenericKeyedObjectPool<Integer, Object, E> m_pool;
private final int m_key;
private final GenericKeyedObjectPool<Integer, Object, E> pool;
private final int key;

Task(final GenericKeyedObjectPool<Integer, Object, E> pool, final int count) {
m_pool = pool;
m_key = count % 20;
this.pool = pool;
this.key = count % 20;
}

private void busyWait(final long timeMillis) {
Expand All @@ -74,12 +74,12 @@ private void busyWait(final long timeMillis) {
public Object call() throws E {
try {
final Object value;
value = m_pool.borrowObject(m_key);
value = pool.borrowObject(key);
// don't make this too long or it won't reproduce, and don't make it zero or it
// won't reproduce
// constant low value also doesn't reproduce
busyWait(System.currentTimeMillis() % 4);
m_pool.returnObject(m_key, value);
pool.returnObject(key, value);
return "success";
} catch (final NoSuchElementException e) {
// ignore, we've exhausted the pool
Expand Down

0 comments on commit f1ae4ee

Please sign in to comment.