commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1537339 - in /commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2: MethodCallPoolableObjectFactory.java TestKeyedObjectPool.java
Date Wed, 30 Oct 2013 23:18:56 GMT
Author: sebb
Date: Wed Oct 30 23:18:56 2013
New Revision: 1537339

URL: http://svn.apache.org/r1537339
Log:
Avoid data hiding

Modified:
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/MethodCallPoolableObjectFactory.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/MethodCallPoolableObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/MethodCallPoolableObjectFactory.java?rev=1537339&r1=1537338&r2=1537339&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/MethodCallPoolableObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/MethodCallPoolableObjectFactory.java
Wed Oct 30 23:18:56 2013
@@ -114,12 +114,12 @@ public class MethodCallPoolableObjectFac
     public PooledObject<Object> makeObject() throws Exception {
         final MethodCall call = new MethodCall("makeObject");
         methodCalls.add(call);
-        int count = this.count++;
+        int originalCount = this.count++;
         if (makeObjectFail) {
             throw new PrivateException("makeObject");
         }
         // Generate new object, don't use cache via Integer.valueOf(...)
-        final Integer obj = new Integer(count);
+        final Integer obj = new Integer(originalCount);
         call.setReturned(obj);
         return new DefaultPooledObject<Object>(obj);
     }

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java?rev=1537339&r1=1537338&r2=1537339&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/TestKeyedObjectPool.java
Wed Oct 30 23:18:56 2013
@@ -749,13 +749,13 @@ public abstract class TestKeyedObjectPoo
         public PooledObject<Object> makeObject(final Object key) throws Exception {
             final MethodCall call = new MethodCall("makeObject", key);
             methodCalls.add(call);
-            int count = this.count++;
+            int originalCount = this.count++;
             if (makeObjectFail) {
                 throw new PrivateException("makeObject");
             }
             // Deliberate choice to create new object in case future unit test
             // checks for a specific object
-            final Integer obj = new Integer(count);
+            final Integer obj = new Integer(originalCount);
             call.setReturned(obj);
             return new DefaultPooledObject<Object>(obj);
         }



Mime
View raw message