commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1051649 - /commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Date Tue, 21 Dec 2010 20:58:35 GMT
Author: simonetripodi
Date: Tue Dec 21 20:58:34 2010
New Revision: 1051649

URL: http://svn.apache.org/viewvc?rev=1051649&view=rev
Log:
fixed non-synchronized methods

Modified:
    commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java

Modified: commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java?rev=1051649&r1=1051648&r2=1051649&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java
Tue Dec 21 20:58:34 2010
@@ -395,7 +395,7 @@ public class GenericObjectPool<T> extend
      * @return <code>true</code> if objects are validated before being borrowed.
      * @see #setTestOnBorrow
      */
-    public boolean getTestOnBorrow() {
+    public synchronized boolean getTestOnBorrow() {
         return this.testOnBorrow;
     }
 
@@ -410,7 +410,7 @@ public class GenericObjectPool<T> extend
      * @param testOnBorrow <code>true</code> if objects should be validated before
being borrowed.
      * @see #getTestOnBorrow
      */
-    public void setTestOnBorrow(boolean testOnBorrow) {
+    public synchronized void setTestOnBorrow(boolean testOnBorrow) {
         this.testOnBorrow = testOnBorrow;
     }
 
@@ -423,7 +423,7 @@ public class GenericObjectPool<T> extend
      * @return <code>true</code> when objects will be validated after returned
to {@link #returnObject}.
      * @see #setTestOnReturn
      */
-    public boolean getTestOnReturn() {
+    public synchronized boolean getTestOnReturn() {
         return this.testOnReturn;
     }
 
@@ -436,7 +436,7 @@ public class GenericObjectPool<T> extend
      * @param testOnReturn <code>true</code> so objects will be validated after
returned to {@link #returnObject}.
      * @see #getTestOnReturn
      */
-    public void setTestOnReturn(boolean testOnReturn) {
+    public synchronized void setTestOnReturn(boolean testOnReturn) {
         this.testOnReturn = testOnReturn;
     }
 



Mime
View raw message