Skip to content

Commit 0aa302b

Browse files
committed
Rename internal method
1 parent 79f493b commit 0aa302b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static class IdentityWrapper<T> {
214214
* @param pooledObject contains the object to wrap.
215215
* @return a new instance wrapping the object in the {@link PooledObject}.
216216
*/
217-
static <T> IdentityWrapper<T> on(final PooledObject<T> pooledObject) {
217+
static <T> IdentityWrapper<T> unwrap(final PooledObject<T> pooledObject) {
218218
return new IdentityWrapper<>(pooledObject.getObject());
219219
}
220220

src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ private PooledObject<T> create(final K key) throws E {
817817
}
818818

819819
createdCount.incrementAndGet();
820-
objectDeque.getAllObjects().put(IdentityWrapper.on(p), p);
820+
objectDeque.getAllObjects().put(IdentityWrapper.unwrap(p), p);
821821
return p;
822822
}
823823

@@ -880,7 +880,7 @@ private boolean destroy(final K key, final PooledObject<T> toDestroy, final bool
880880
}
881881
}
882882
if (isIdle || always) {
883-
objectDeque.getAllObjects().remove(IdentityWrapper.on(toDestroy));
883+
objectDeque.getAllObjects().remove(IdentityWrapper.unwrap(toDestroy));
884884
toDestroy.invalidate();
885885

886886
try {

src/main/java/org/apache/commons/pool3/impl/GenericObjectPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ private PooledObject<T> create(final Duration maxWaitDurationRequest) throws E {
606606
private void destroy(final PooledObject<T> toDestroy, final DestroyMode destroyMode) throws E {
607607
toDestroy.invalidate();
608608
idleObjects.remove(toDestroy);
609-
allObjects.remove(IdentityWrapper.on(toDestroy));
609+
allObjects.remove(IdentityWrapper.unwrap(toDestroy));
610610
try {
611611
factory.destroyObject(toDestroy, destroyMode);
612612
} finally {

0 commit comments

Comments
 (0)