commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r777749 - in /commons/proper/pool/trunk/src/test/org/apache/commons/pool: impl/TestGenericObjectPool.java performance/SleepingObjectFactory.java
Date Sat, 23 May 2009 00:04:55 GMT
Author: sebb
Date: Sat May 23 00:04:54 2009
New Revision: 777749

URL: http://svn.apache.org/viewvc?rev=777749&view=rev
Log:
Tab police

Modified:
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
    commons/proper/pool/trunk/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java?rev=777749&r1=777748&r2=777749&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestGenericObjectPool.java
Sat May 23 00:04:54 2009
@@ -1227,15 +1227,15 @@
 
     public void testAddObject() throws Exception {
         assertEquals("should be zero idle", 0, pool.getNumIdle());
-    	pool.addObject();
-		assertEquals("should be one idle", 1, pool.getNumIdle());
-		assertEquals("should be zero active", 0, pool.getNumActive());
-		Object obj = pool.borrowObject();
-		assertEquals("should be zero idle", 0, pool.getNumIdle());
-		assertEquals("should be one active", 1, pool.getNumActive());
-		pool.returnObject(obj);
-		assertEquals("should be one idle", 1, pool.getNumIdle());
-		assertEquals("should be zero active", 0, pool.getNumActive());
+        pool.addObject();
+        assertEquals("should be one idle", 1, pool.getNumIdle());
+        assertEquals("should be zero active", 0, pool.getNumActive());
+        Object obj = pool.borrowObject();
+        assertEquals("should be zero idle", 0, pool.getNumIdle());
+        assertEquals("should be one active", 1, pool.getNumActive());
+        pool.returnObject(obj);
+        assertEquals("should be one idle", 1, pool.getNumIdle());
+        assertEquals("should be zero active", 0, pool.getNumActive());
 
         ObjectPool op = new GenericObjectPool();
         try {
@@ -1436,5 +1436,3 @@
         }
     }
 }
-
-

Modified: commons/proper/pool/trunk/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java?rev=777749&r1=777748&r2=777749&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
(original)
+++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/performance/SleepingObjectFactory.java
Sat May 23 00:04:54 2009
@@ -30,33 +30,33 @@
     private int counter = 0;
     private boolean debug = false;
 
-	public Object makeObject() throws Exception {
+    public Object makeObject() throws Exception {
         Object obj = new Integer(counter++);
         debug("makeObject", obj);
         sleep(500);
-		return obj;
-	}
+        return obj;
+    }
 
-	public void destroyObject(Object obj) throws Exception {
+    public void destroyObject(Object obj) throws Exception {
         debug("destroyObject", obj);
         sleep(250);
-	}
+    }
 
-	public boolean validateObject(Object obj) {
+    public boolean validateObject(Object obj) {
         debug("validateObject", obj);
         sleep(30);
-		return true;
-	}
+        return true;
+    }
 
-	public void activateObject(Object obj) throws Exception {
+    public void activateObject(Object obj) throws Exception {
         debug("activateObject", obj);
         sleep(10);
-	}
+    }
 
-	public void passivateObject(Object obj) throws Exception {
+    public void passivateObject(Object obj) throws Exception {
         debug("passivateObject", obj);
         sleep(10);
-	}
+    }
     
     private void debug(String method, Object obj) {
         if (debug) {



Mime
View raw message