commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1534327 - in /commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl: TestGenericKeyedObjectPool.java TestGenericObjectPool.java
Date Mon, 21 Oct 2013 19:06:53 GMT
Author: markt
Date: Mon Oct 21 19:06:53 2013
New Revision: 1534327

URL: http://svn.apache.org/r1534327
Log:
Checkstyle warnings

Modified:
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java?rev=1534327&r1=1534326&r2=1534327&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java
Mon Oct 21 19:06:53 2013
@@ -1041,17 +1041,18 @@ public class TestGenericKeyedObjectPool 
                 pool.getMinEvictableIdleTimeMillis());
         assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,
                 pool.getNumTestsPerEvictionRun());
-        assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_TEST_ON_BORROW,
-                pool.getTestOnBorrow());
-        assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_TEST_ON_RETURN,
-                pool.getTestOnReturn());
-        assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE,
-                pool.getTestWhileIdle());
+        assertEquals(Boolean.valueOf(GenericKeyedObjectPoolConfig.DEFAULT_TEST_ON_BORROW),
+                Boolean.valueOf(pool.getTestOnBorrow()));
+        assertEquals(Boolean.valueOf(GenericKeyedObjectPoolConfig.DEFAULT_TEST_ON_RETURN),
+                Boolean.valueOf(pool.getTestOnReturn()));
+        assertEquals(Boolean.valueOf(GenericKeyedObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE),
+                Boolean.valueOf(pool.getTestWhileIdle()));
         assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,
                 pool.getTimeBetweenEvictionRunsMillis());
-        assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED,
-                pool.getBlockWhenExhausted());
-        assertEquals(GenericKeyedObjectPoolConfig.DEFAULT_LIFO, pool.getLifo());
+        assertEquals(Boolean.valueOf(GenericKeyedObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED),
+                Boolean.valueOf(pool.getBlockWhenExhausted()));
+        assertEquals(Boolean.valueOf(GenericKeyedObjectPoolConfig.DEFAULT_LIFO),
+                Boolean.valueOf(pool.getLifo()));
         pool.close();
 
         GenericKeyedObjectPoolConfig config =
@@ -1078,13 +1079,18 @@ public class TestGenericKeyedObjectPool 
         assertEquals(minEvictableIdleTimeMillis,
                 pool.getMinEvictableIdleTimeMillis());
         assertEquals(numTestsPerEvictionRun, pool.getNumTestsPerEvictionRun());
-        assertEquals(testOnBorrow,pool.getTestOnBorrow());
-        assertEquals(testOnReturn,pool.getTestOnReturn());
-        assertEquals(testWhileIdle,pool.getTestWhileIdle());
+        assertEquals(Boolean.valueOf(testOnBorrow),
+                Boolean.valueOf(pool.getTestOnBorrow()));
+        assertEquals(Boolean.valueOf(testOnReturn),
+                Boolean.valueOf(pool.getTestOnReturn()));
+        assertEquals(Boolean.valueOf(testWhileIdle),
+                Boolean.valueOf(pool.getTestWhileIdle()));
         assertEquals(timeBetweenEvictionRunsMillis,
                 pool.getTimeBetweenEvictionRunsMillis());
-        assertEquals(blockWhenExhausted,pool.getBlockWhenExhausted());
-        assertEquals(lifo, pool.getLifo());
+        assertEquals(Boolean.valueOf(blockWhenExhausted),
+                Boolean.valueOf(pool.getBlockWhenExhausted()));
+        assertEquals(Boolean.valueOf(lifo),
+                Boolean.valueOf(pool.getLifo()));
         pool.close();
     }
 

Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java?rev=1534327&r1=1534326&r2=1534327&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
Mon Oct 21 19:06:53 2013
@@ -142,17 +142,18 @@ public class TestGenericObjectPool exten
                 pool.getMinEvictableIdleTimeMillis());
         assertEquals(GenericObjectPoolConfig.DEFAULT_NUM_TESTS_PER_EVICTION_RUN,
                 pool.getNumTestsPerEvictionRun());
-        assertEquals(GenericObjectPoolConfig.DEFAULT_TEST_ON_BORROW,
-                pool.getTestOnBorrow());
-        assertEquals(GenericObjectPoolConfig.DEFAULT_TEST_ON_RETURN,
-                pool.getTestOnReturn());
-        assertEquals(GenericObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE,
-                pool.getTestWhileIdle());
+        assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_ON_BORROW),
+                Boolean.valueOf(pool.getTestOnBorrow()));
+        assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_ON_RETURN),
+                Boolean.valueOf(pool.getTestOnReturn()));
+        assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_TEST_WHILE_IDLE),
+                Boolean.valueOf(pool.getTestWhileIdle()));
         assertEquals(GenericObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS,
                 pool.getTimeBetweenEvictionRunsMillis());
-        assertEquals(GenericObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED,
-                pool.getBlockWhenExhausted());
-        assertEquals(GenericObjectPoolConfig.DEFAULT_LIFO, pool.getLifo());
+        assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_BLOCK_WHEN_EXHAUSTED),
+                Boolean.valueOf(pool.getBlockWhenExhausted()));
+        assertEquals(Boolean.valueOf(GenericObjectPoolConfig.DEFAULT_LIFO),
+                Boolean.valueOf(pool.getLifo()));
         pool.close();
 
         GenericObjectPoolConfig config =
@@ -177,13 +178,17 @@ public class TestGenericObjectPool exten
         assertEquals(minEvictableIdleTimeMillis,
                 pool.getMinEvictableIdleTimeMillis());
         assertEquals(numTestsPerEvictionRun, pool.getNumTestsPerEvictionRun());
-        assertEquals(testOnBorrow,pool.getTestOnBorrow());
-        assertEquals(testOnReturn,pool.getTestOnReturn());
-        assertEquals(testWhileIdle,pool.getTestWhileIdle());
+        assertEquals(Boolean.valueOf(testOnBorrow),
+                Boolean.valueOf(pool.getTestOnBorrow()));
+        assertEquals(Boolean.valueOf(testOnReturn),
+                Boolean.valueOf(pool.getTestOnReturn()));
+        assertEquals(Boolean.valueOf(testWhileIdle),
+                Boolean.valueOf(pool.getTestWhileIdle()));
         assertEquals(timeBetweenEvictionRunsMillis,
                 pool.getTimeBetweenEvictionRunsMillis());
-        assertEquals(blockWhenExhausted,pool.getBlockWhenExhausted());
-        assertEquals(lifo, pool.getLifo());
+        assertEquals(Boolean.valueOf(blockWhenExhausted),
+                Boolean.valueOf(pool.getBlockWhenExhausted()));
+        assertEquals(Boolean.valueOf(lifo), Boolean.valueOf(pool.getLifo()));
         pool.close();
     }
 
@@ -1504,10 +1509,15 @@ public class TestGenericObjectPool exten
     private SimpleFactory factory = null;
 
     private void assertConfiguration(GenericObjectPoolConfig expected, GenericObjectPool<?>
actual) throws Exception {
-        assertEquals("testOnBorrow",expected.getTestOnBorrow(),actual.getTestOnBorrow());
-        assertEquals("testOnReturn",expected.getTestOnReturn(),actual.getTestOnReturn());
-        assertEquals("testWhileIdle",expected.getTestWhileIdle(),actual.getTestWhileIdle());
-        assertEquals("whenExhaustedAction",expected.getBlockWhenExhausted(),actual.getBlockWhenExhausted());
+        assertEquals("testOnBorrow",Boolean.valueOf(expected.getTestOnBorrow()),
+                Boolean.valueOf(actual.getTestOnBorrow()));
+        assertEquals("testOnReturn",Boolean.valueOf(expected.getTestOnReturn()),
+                Boolean.valueOf(actual.getTestOnReturn()));
+        assertEquals("testWhileIdle",Boolean.valueOf(expected.getTestWhileIdle()),
+                Boolean.valueOf(actual.getTestWhileIdle()));
+        assertEquals("whenExhaustedAction",
+                Boolean.valueOf(expected.getBlockWhenExhausted()),
+                Boolean.valueOf(actual.getBlockWhenExhausted()));
         assertEquals("maxTotal",expected.getMaxTotal(),actual.getMaxTotal());
         assertEquals("maxIdle",expected.getMaxIdle(),actual.getMaxIdle());
         assertEquals("maxWait",expected.getMaxWaitMillis(),actual.getMaxWaitMillis());



Mime
View raw message