commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1332423 - /commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Date Mon, 30 Apr 2012 22:16:45 GMT
On 30 April 2012 22:49,  <markt@apache.org> wrote:
> Author: markt
> Date: Mon Apr 30 21:49:44 2012
> New Revision: 1332423
>
> URL: http://svn.apache.org/viewvc?rev=1332423&view=rev
> Log:
> Typo
>
> Modified:
>    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
>
> Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java?rev=1332423&r1=1332422&r2=1332423&view=diff
> ==============================================================================
> --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
(original)
> +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/GenericKeyedObjectPool.java
Mon Apr 30 21:49:44 2012
> @@ -1002,7 +1002,7 @@ public class GenericKeyedObjectPool<K,T>
>                             !evictionKeyIterator.hasNext()) {
>                         List<K> keyCopy = new ArrayList<K>();
>                         Lock lock = keyLock.readLock();

Perhaps rename as readLock rather than the generic lock?
Makes it clearer that the following code is only read-protected.

Similarly elsewhere for writeLock.

> -                        lock .lock();
> +                        lock.lock();
>                         try {
>                             keyCopy.addAll(poolKeyList);
>                         } finally {
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message