You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2016/11/02 15:53:09 UTC

svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Author: markt
Date: Wed Nov  2 15:53:08 2016
New Revision: 1767714

URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
Log:
Check class used for evictionPolicyClassName implements EvictionPolicy

Modified:
    commons/proper/pool/trunk/src/changes/changes.xml
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2 15:53:08 2016
@@ -67,6 +67,10 @@ The <action> type attribute can be add,u
       maxTotal threads try to borrow objects with different keys at the same
       time and the factory destroys objects on return. 
     </action>
+    <action dev="markt" type="fix">
+      Ensure that any class name used for evictionPolicyClassName represents a
+      class that implements EvictionPolicy.
+    </action>
   </release>
   <release version="2.4.2" date="2015-08-01" description=
  "This is a patch release, including bug fixes only.">

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?rev=1767714&r1=1767713&r2=1767714&view=diff
==============================================================================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java (original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java Wed Nov  2 15:53:08 2016
@@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
                 final
                 EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>) policy;
                 this.evictionPolicy = evicPolicy;
+            } else {
+                throw new IllegalArgumentException("[" + evictionPolicyClassName +
+                        "] does not implement EvictionPolicy");
             }
         } catch (final ClassNotFoundException e) {
             throw new IllegalArgumentException(

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=1767714&r1=1767713&r2=1767714&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 Wed Nov  2 15:53:08 2016
@@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
             // expected
         }
 
+        try {
+            pool.setEvictionPolicyClassName(java.lang.String.class.getName());
+            fail("setEvictionPolicyClassName must throw an error if a class that does not "
+                    + "implement EvictionPolicy is specified.");
+        } catch (final IllegalArgumentException e) {
+            // expected
+        }
+
         pool.setEvictionPolicyClassName(TestEvictionPolicy.class.getName());
         assertEquals(TestEvictionPolicy.class.getName(), pool.getEvictionPolicyClassName());
 
@@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
         public SimpleFactory() {
             this(true);
         }
-        
+
         public SimpleFactory(final boolean valid) {
             this(valid,valid);
         }
-        
+
         public SimpleFactory(final boolean evalid, final boolean ovalid) {
             evenValid = evalid;
             oddValid = ovalid;
         }
-        
+
         public synchronized void setValid(final boolean valid) {
             setEvenValid(valid);
             setOddValid(valid);
         }
-        
+
         public synchronized void setEvenValid(final boolean valid) {
             evenValid = valid;
         }
-        
+
         public synchronized void setOddValid(final boolean valid) {
             oddValid = valid;
         }
-        
+
         public synchronized void setThrowExceptionOnPassivate(final boolean bool) {
             exceptionOnPassivate = bool;
         }
-        
+
         public synchronized void setMaxTotal(final int maxTotal) {
             this.maxTotal = maxTotal;
         }
-        
+
         public synchronized void setDestroyLatency(final long destroyLatency) {
             this.destroyLatency = destroyLatency;
         }
-        
+
         public synchronized void setMakeLatency(final long makeLatency) {
             this.makeLatency = makeLatency;
         }
-        
+
         public synchronized void setValidateLatency(final long validateLatency) {
             this.validateLatency = validateLatency;
         }
-        
+
         @Override
         public PooledObject<String> makeObject() {
             final long waitLatency;
@@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
             }
             return new DefaultPooledObject<String>(String.valueOf(counter));
         }
-        
+
         @Override
         public void destroyObject(final PooledObject<String> obj) throws Exception {
             final long waitLatency;
@@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
                 throw new Exception();
             }
         }
-        
+
         @Override
         public boolean validateObject(final PooledObject<String> obj) {
             final boolean validate;
@@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
             }
             return true;
         }
-        
+
         @Override
         public void activateObject(final PooledObject<String> obj) throws Exception {
             final boolean hurl;
@@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
                 }
             }
         }
-        
+
         @Override
         public void passivateObject(final PooledObject<String> obj) throws Exception {
             final boolean hurl;



Re: Fwd: svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Posted by Mark Thomas <ma...@apache.org>.
On 02/11/2016 20:23, Mark Thomas wrote:
> On 02/11/2016 18:36, Gary Gregory wrote:
>> The close() issue seems worth getting in for 2.4.3 IMO.
> 
> Agreed. I almost have that fixed (need to complete a few memory leak
> checks in Tomcat).
> 
> It is going to need to new configuration option to control how long to
> wait for the executor to stop. That probably means 2.5 rather than 2.4.3.

OK. I'm done with open Pool 2.x bugs. There are still some enhancement
requests but none of them represent itches I want to scratch at this point.

Mark


> 
> Mark
> 
> 
>>
>> G
>>
>> On Wed, Nov 2, 2016 at 11:29 AM, Mark Thomas <ma...@apache.org> wrote:
>>
>>> On 02/11/2016 18:12, Gary Gregory wrote:
>>>> Is it time to push out 2.4.3? There are couple of interesting fixes.
>>>
>>> Getting close. I'd like to finish going through the open issues first.
>>>
>>> Mark
>>>
>>>
>>>>
>>>> Gary
>>>> ---------- Forwarded message ----------
>>>> From: <ma...@apache.org>
>>>> Date: Wed, Nov 2, 2016 at 8:53 AM
>>>> Subject: svn commit: r1767714 - in /commons/proper/pool/trunk/src:
>>>> changes/changes.xml
>>>> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
>>>> test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
>>>> To: commits@commons.apache.org
>>>>
>>>>
>>>> Author: markt
>>>> Date: Wed Nov  2 15:53:08 2016
>>>> New Revision: 1767714
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
>>>> Log:
>>>> Check class used for evictionPolicyClassName implements EvictionPolicy
>>>>
>>>> Modified:
>>>>     commons/proper/pool/trunk/src/changes/changes.xml
>>>>     commons/proper/pool/trunk/src/main/java/org/apache/commons/
>>> pool2/impl/
>>>> BaseGenericObjectPool.java
>>>>     commons/proper/pool/trunk/src/test/java/org/apache/commons/
>>> pool2/impl/
>>>> TestGenericObjectPool.java
>>>>
>>>> Modified: commons/proper/pool/trunk/src/changes/changes.xml
>>>> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
>>>> changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
>>>> ============================================================
>>>> ==================
>>>> --- commons/proper/pool/trunk/src/changes/changes.xml (original)
>>>> +++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2
>>> 15:53:08
>>>> 2016
>>>> @@ -67,6 +67,10 @@ The <action> type attribute can be add,u
>>>>        maxTotal threads try to borrow objects with different keys at the
>>>> same
>>>>        time and the factory destroys objects on return.
>>>>      </action>
>>>> +    <action dev="markt" type="fix">
>>>> +      Ensure that any class name used for evictionPolicyClassName
>>>> represents a
>>>> +      class that implements EvictionPolicy.
>>>> +    </action>
>>>>    </release>
>>>>    <release version="2.4.2" date="2015-08-01" description=
>>>>   "This is a patch release, including bug fixes only.">
>>>>
>>>> Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
>>>> pool2/impl/BaseGenericObjectPool.java
>>>> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
>>>> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
>>>> rev=1767714&r1=1767713&r2=1767714&view=diff
>>>> ============================================================
>>>> ==================
>>>> --- commons/proper/pool/trunk/src/main/java/org/apache/commons/
>>> pool2/impl/BaseGenericObjectPool.java
>>>> (original)
>>>> +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/
>>> pool2/impl/BaseGenericObjectPool.java
>>>> Wed Nov  2 15:53:08 2016
>>>> @@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
>>>>                  final
>>>>                  EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>)
>>> policy;
>>>>                  this.evictionPolicy = evicPolicy;
>>>> +            } else {
>>>> +                throw new IllegalArgumentException("[" +
>>>> evictionPolicyClassName +
>>>> +                        "] does not implement EvictionPolicy");
>>>>              }
>>>>          } catch (final ClassNotFoundException e) {
>>>>              throw new IllegalArgumentException(
>>>>
>>>> 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=1767714&r1=1767713&r2=1767714&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
>>>> Wed Nov  2 15:53:08 2016
>>>> @@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
>>>>              // expected
>>>>          }
>>>>
>>>> +        try {
>>>> +            pool.setEvictionPolicyClassName(java.lang.String.class.
>>>> getName());
>>>> +            fail("setEvictionPolicyClassName must throw an error if a
>>>> class that does not "
>>>> +                    + "implement EvictionPolicy is specified.");
>>>> +        } catch (final IllegalArgumentException e) {
>>>> +            // expected
>>>> +        }
>>>> +
>>>>          pool.setEvictionPolicyClassName(TestEvictionPolicy.class.
>>>> getName());
>>>>          assertEquals(TestEvictionPolicy.class.getName(), pool.
>>>> getEvictionPolicyClassName());
>>>>
>>>> @@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
>>>>          public SimpleFactory() {
>>>>              this(true);
>>>>          }
>>>> -
>>>> +
>>>>          public SimpleFactory(final boolean valid) {
>>>>              this(valid,valid);
>>>>          }
>>>> -
>>>> +
>>>>          public SimpleFactory(final boolean evalid, final boolean
>>> ovalid) {
>>>>              evenValid = evalid;
>>>>              oddValid = ovalid;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setValid(final boolean valid) {
>>>>              setEvenValid(valid);
>>>>              setOddValid(valid);
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setEvenValid(final boolean valid) {
>>>>              evenValid = valid;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setOddValid(final boolean valid) {
>>>>              oddValid = valid;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setThrowExceptionOnPassivate(final
>>>> boolean bool) {
>>>>              exceptionOnPassivate = bool;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setMaxTotal(final int maxTotal) {
>>>>              this.maxTotal = maxTotal;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setDestroyLatency(final long
>>>> destroyLatency) {
>>>>              this.destroyLatency = destroyLatency;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setMakeLatency(final long makeLatency)
>>> {
>>>>              this.makeLatency = makeLatency;
>>>>          }
>>>> -
>>>> +
>>>>          public synchronized void setValidateLatency(final long
>>>> validateLatency) {
>>>>              this.validateLatency = validateLatency;
>>>>          }
>>>> -
>>>> +
>>>>          @Override
>>>>          public PooledObject<String> makeObject() {
>>>>              final long waitLatency;
>>>> @@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
>>>>              }
>>>>              return new DefaultPooledObject<String>(
>>>> String.valueOf(counter));
>>>>          }
>>>> -
>>>> +
>>>>          @Override
>>>>          public void destroyObject(final PooledObject<String> obj) throws
>>>> Exception {
>>>>              final long waitLatency;
>>>> @@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
>>>>                  throw new Exception();
>>>>              }
>>>>          }
>>>> -
>>>> +
>>>>          @Override
>>>>          public boolean validateObject(final PooledObject<String> obj) {
>>>>              final boolean validate;
>>>> @@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
>>>>              }
>>>>              return true;
>>>>          }
>>>> -
>>>> +
>>>>          @Override
>>>>          public void activateObject(final PooledObject<String> obj)
>>> throws
>>>> Exception {
>>>>              final boolean hurl;
>>>> @@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
>>>>                  }
>>>>              }
>>>>          }
>>>> -
>>>> +
>>>>          @Override
>>>>          public void passivateObject(final PooledObject<String> obj)
>>> throws
>>>> Exception {
>>>>              final boolean hurl;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


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


Re: Fwd: svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Posted by Mark Thomas <ma...@apache.org>.
On 02/11/2016 18:36, Gary Gregory wrote:
> The close() issue seems worth getting in for 2.4.3 IMO.

Agreed. I almost have that fixed (need to complete a few memory leak
checks in Tomcat).

It is going to need to new configuration option to control how long to
wait for the executor to stop. That probably means 2.5 rather than 2.4.3.

Mark


> 
> G
> 
> On Wed, Nov 2, 2016 at 11:29 AM, Mark Thomas <ma...@apache.org> wrote:
> 
>> On 02/11/2016 18:12, Gary Gregory wrote:
>>> Is it time to push out 2.4.3? There are couple of interesting fixes.
>>
>> Getting close. I'd like to finish going through the open issues first.
>>
>> Mark
>>
>>
>>>
>>> Gary
>>> ---------- Forwarded message ----------
>>> From: <ma...@apache.org>
>>> Date: Wed, Nov 2, 2016 at 8:53 AM
>>> Subject: svn commit: r1767714 - in /commons/proper/pool/trunk/src:
>>> changes/changes.xml
>>> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
>>> test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
>>> To: commits@commons.apache.org
>>>
>>>
>>> Author: markt
>>> Date: Wed Nov  2 15:53:08 2016
>>> New Revision: 1767714
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
>>> Log:
>>> Check class used for evictionPolicyClassName implements EvictionPolicy
>>>
>>> Modified:
>>>     commons/proper/pool/trunk/src/changes/changes.xml
>>>     commons/proper/pool/trunk/src/main/java/org/apache/commons/
>> pool2/impl/
>>> BaseGenericObjectPool.java
>>>     commons/proper/pool/trunk/src/test/java/org/apache/commons/
>> pool2/impl/
>>> TestGenericObjectPool.java
>>>
>>> Modified: commons/proper/pool/trunk/src/changes/changes.xml
>>> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
>>> changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
>>> ============================================================
>>> ==================
>>> --- commons/proper/pool/trunk/src/changes/changes.xml (original)
>>> +++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2
>> 15:53:08
>>> 2016
>>> @@ -67,6 +67,10 @@ The <action> type attribute can be add,u
>>>        maxTotal threads try to borrow objects with different keys at the
>>> same
>>>        time and the factory destroys objects on return.
>>>      </action>
>>> +    <action dev="markt" type="fix">
>>> +      Ensure that any class name used for evictionPolicyClassName
>>> represents a
>>> +      class that implements EvictionPolicy.
>>> +    </action>
>>>    </release>
>>>    <release version="2.4.2" date="2015-08-01" description=
>>>   "This is a patch release, including bug fixes only.">
>>>
>>> Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
>>> pool2/impl/BaseGenericObjectPool.java
>>> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
>>> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
>>> rev=1767714&r1=1767713&r2=1767714&view=diff
>>> ============================================================
>>> ==================
>>> --- commons/proper/pool/trunk/src/main/java/org/apache/commons/
>> pool2/impl/BaseGenericObjectPool.java
>>> (original)
>>> +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/
>> pool2/impl/BaseGenericObjectPool.java
>>> Wed Nov  2 15:53:08 2016
>>> @@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
>>>                  final
>>>                  EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>)
>> policy;
>>>                  this.evictionPolicy = evicPolicy;
>>> +            } else {
>>> +                throw new IllegalArgumentException("[" +
>>> evictionPolicyClassName +
>>> +                        "] does not implement EvictionPolicy");
>>>              }
>>>          } catch (final ClassNotFoundException e) {
>>>              throw new IllegalArgumentException(
>>>
>>> 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=1767714&r1=1767713&r2=1767714&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
>>> Wed Nov  2 15:53:08 2016
>>> @@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
>>>              // expected
>>>          }
>>>
>>> +        try {
>>> +            pool.setEvictionPolicyClassName(java.lang.String.class.
>>> getName());
>>> +            fail("setEvictionPolicyClassName must throw an error if a
>>> class that does not "
>>> +                    + "implement EvictionPolicy is specified.");
>>> +        } catch (final IllegalArgumentException e) {
>>> +            // expected
>>> +        }
>>> +
>>>          pool.setEvictionPolicyClassName(TestEvictionPolicy.class.
>>> getName());
>>>          assertEquals(TestEvictionPolicy.class.getName(), pool.
>>> getEvictionPolicyClassName());
>>>
>>> @@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
>>>          public SimpleFactory() {
>>>              this(true);
>>>          }
>>> -
>>> +
>>>          public SimpleFactory(final boolean valid) {
>>>              this(valid,valid);
>>>          }
>>> -
>>> +
>>>          public SimpleFactory(final boolean evalid, final boolean
>> ovalid) {
>>>              evenValid = evalid;
>>>              oddValid = ovalid;
>>>          }
>>> -
>>> +
>>>          public synchronized void setValid(final boolean valid) {
>>>              setEvenValid(valid);
>>>              setOddValid(valid);
>>>          }
>>> -
>>> +
>>>          public synchronized void setEvenValid(final boolean valid) {
>>>              evenValid = valid;
>>>          }
>>> -
>>> +
>>>          public synchronized void setOddValid(final boolean valid) {
>>>              oddValid = valid;
>>>          }
>>> -
>>> +
>>>          public synchronized void setThrowExceptionOnPassivate(final
>>> boolean bool) {
>>>              exceptionOnPassivate = bool;
>>>          }
>>> -
>>> +
>>>          public synchronized void setMaxTotal(final int maxTotal) {
>>>              this.maxTotal = maxTotal;
>>>          }
>>> -
>>> +
>>>          public synchronized void setDestroyLatency(final long
>>> destroyLatency) {
>>>              this.destroyLatency = destroyLatency;
>>>          }
>>> -
>>> +
>>>          public synchronized void setMakeLatency(final long makeLatency)
>> {
>>>              this.makeLatency = makeLatency;
>>>          }
>>> -
>>> +
>>>          public synchronized void setValidateLatency(final long
>>> validateLatency) {
>>>              this.validateLatency = validateLatency;
>>>          }
>>> -
>>> +
>>>          @Override
>>>          public PooledObject<String> makeObject() {
>>>              final long waitLatency;
>>> @@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
>>>              }
>>>              return new DefaultPooledObject<String>(
>>> String.valueOf(counter));
>>>          }
>>> -
>>> +
>>>          @Override
>>>          public void destroyObject(final PooledObject<String> obj) throws
>>> Exception {
>>>              final long waitLatency;
>>> @@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
>>>                  throw new Exception();
>>>              }
>>>          }
>>> -
>>> +
>>>          @Override
>>>          public boolean validateObject(final PooledObject<String> obj) {
>>>              final boolean validate;
>>> @@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
>>>              }
>>>              return true;
>>>          }
>>> -
>>> +
>>>          @Override
>>>          public void activateObject(final PooledObject<String> obj)
>> throws
>>> Exception {
>>>              final boolean hurl;
>>> @@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
>>>                  }
>>>              }
>>>          }
>>> -
>>> +
>>>          @Override
>>>          public void passivateObject(final PooledObject<String> obj)
>> throws
>>> Exception {
>>>              final boolean hurl;
>>>
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
> 
> 


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


Re: Fwd: svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Posted by Gary Gregory <ga...@gmail.com>.
The close() issue seems worth getting in for 2.4.3 IMO.

G

On Wed, Nov 2, 2016 at 11:29 AM, Mark Thomas <ma...@apache.org> wrote:

> On 02/11/2016 18:12, Gary Gregory wrote:
> > Is it time to push out 2.4.3? There are couple of interesting fixes.
>
> Getting close. I'd like to finish going through the open issues first.
>
> Mark
>
>
> >
> > Gary
> > ---------- Forwarded message ----------
> > From: <ma...@apache.org>
> > Date: Wed, Nov 2, 2016 at 8:53 AM
> > Subject: svn commit: r1767714 - in /commons/proper/pool/trunk/src:
> > changes/changes.xml
> > main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> > test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
> > To: commits@commons.apache.org
> >
> >
> > Author: markt
> > Date: Wed Nov  2 15:53:08 2016
> > New Revision: 1767714
> >
> > URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
> > Log:
> > Check class used for evictionPolicyClassName implements EvictionPolicy
> >
> > Modified:
> >     commons/proper/pool/trunk/src/changes/changes.xml
> >     commons/proper/pool/trunk/src/main/java/org/apache/commons/
> pool2/impl/
> > BaseGenericObjectPool.java
> >     commons/proper/pool/trunk/src/test/java/org/apache/commons/
> pool2/impl/
> > TestGenericObjectPool.java
> >
> > Modified: commons/proper/pool/trunk/src/changes/changes.xml
> > URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> > changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
> > ============================================================
> > ==================
> > --- commons/proper/pool/trunk/src/changes/changes.xml (original)
> > +++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2
> 15:53:08
> > 2016
> > @@ -67,6 +67,10 @@ The <action> type attribute can be add,u
> >        maxTotal threads try to borrow objects with different keys at the
> > same
> >        time and the factory destroys objects on return.
> >      </action>
> > +    <action dev="markt" type="fix">
> > +      Ensure that any class name used for evictionPolicyClassName
> > represents a
> > +      class that implements EvictionPolicy.
> > +    </action>
> >    </release>
> >    <release version="2.4.2" date="2015-08-01" description=
> >   "This is a patch release, including bug fixes only.">
> >
> > Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
> > pool2/impl/BaseGenericObjectPool.java
> > URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> > main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
> > rev=1767714&r1=1767713&r2=1767714&view=diff
> > ============================================================
> > ==================
> > --- commons/proper/pool/trunk/src/main/java/org/apache/commons/
> pool2/impl/BaseGenericObjectPool.java
> > (original)
> > +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/
> pool2/impl/BaseGenericObjectPool.java
> > Wed Nov  2 15:53:08 2016
> > @@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
> >                  final
> >                  EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>)
> policy;
> >                  this.evictionPolicy = evicPolicy;
> > +            } else {
> > +                throw new IllegalArgumentException("[" +
> > evictionPolicyClassName +
> > +                        "] does not implement EvictionPolicy");
> >              }
> >          } catch (final ClassNotFoundException e) {
> >              throw new IllegalArgumentException(
> >
> > 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=1767714&r1=1767713&r2=1767714&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
> > Wed Nov  2 15:53:08 2016
> > @@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
> >              // expected
> >          }
> >
> > +        try {
> > +            pool.setEvictionPolicyClassName(java.lang.String.class.
> > getName());
> > +            fail("setEvictionPolicyClassName must throw an error if a
> > class that does not "
> > +                    + "implement EvictionPolicy is specified.");
> > +        } catch (final IllegalArgumentException e) {
> > +            // expected
> > +        }
> > +
> >          pool.setEvictionPolicyClassName(TestEvictionPolicy.class.
> > getName());
> >          assertEquals(TestEvictionPolicy.class.getName(), pool.
> > getEvictionPolicyClassName());
> >
> > @@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
> >          public SimpleFactory() {
> >              this(true);
> >          }
> > -
> > +
> >          public SimpleFactory(final boolean valid) {
> >              this(valid,valid);
> >          }
> > -
> > +
> >          public SimpleFactory(final boolean evalid, final boolean
> ovalid) {
> >              evenValid = evalid;
> >              oddValid = ovalid;
> >          }
> > -
> > +
> >          public synchronized void setValid(final boolean valid) {
> >              setEvenValid(valid);
> >              setOddValid(valid);
> >          }
> > -
> > +
> >          public synchronized void setEvenValid(final boolean valid) {
> >              evenValid = valid;
> >          }
> > -
> > +
> >          public synchronized void setOddValid(final boolean valid) {
> >              oddValid = valid;
> >          }
> > -
> > +
> >          public synchronized void setThrowExceptionOnPassivate(final
> > boolean bool) {
> >              exceptionOnPassivate = bool;
> >          }
> > -
> > +
> >          public synchronized void setMaxTotal(final int maxTotal) {
> >              this.maxTotal = maxTotal;
> >          }
> > -
> > +
> >          public synchronized void setDestroyLatency(final long
> > destroyLatency) {
> >              this.destroyLatency = destroyLatency;
> >          }
> > -
> > +
> >          public synchronized void setMakeLatency(final long makeLatency)
> {
> >              this.makeLatency = makeLatency;
> >          }
> > -
> > +
> >          public synchronized void setValidateLatency(final long
> > validateLatency) {
> >              this.validateLatency = validateLatency;
> >          }
> > -
> > +
> >          @Override
> >          public PooledObject<String> makeObject() {
> >              final long waitLatency;
> > @@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
> >              }
> >              return new DefaultPooledObject<String>(
> > String.valueOf(counter));
> >          }
> > -
> > +
> >          @Override
> >          public void destroyObject(final PooledObject<String> obj) throws
> > Exception {
> >              final long waitLatency;
> > @@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
> >                  throw new Exception();
> >              }
> >          }
> > -
> > +
> >          @Override
> >          public boolean validateObject(final PooledObject<String> obj) {
> >              final boolean validate;
> > @@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
> >              }
> >              return true;
> >          }
> > -
> > +
> >          @Override
> >          public void activateObject(final PooledObject<String> obj)
> throws
> > Exception {
> >              final boolean hurl;
> > @@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
> >                  }
> >              }
> >          }
> > -
> > +
> >          @Override
> >          public void passivateObject(final PooledObject<String> obj)
> throws
> > Exception {
> >              final boolean hurl;
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: Fwd: svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Posted by Mark Thomas <ma...@apache.org>.
On 02/11/2016 18:12, Gary Gregory wrote:
> Is it time to push out 2.4.3? There are couple of interesting fixes.

Getting close. I'd like to finish going through the open issues first.

Mark


> 
> Gary
> ---------- Forwarded message ----------
> From: <ma...@apache.org>
> Date: Wed, Nov 2, 2016 at 8:53 AM
> Subject: svn commit: r1767714 - in /commons/proper/pool/trunk/src:
> changes/changes.xml
> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
> To: commits@commons.apache.org
> 
> 
> Author: markt
> Date: Wed Nov  2 15:53:08 2016
> New Revision: 1767714
> 
> URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
> Log:
> Check class used for evictionPolicyClassName implements EvictionPolicy
> 
> Modified:
>     commons/proper/pool/trunk/src/changes/changes.xml
>     commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/
> BaseGenericObjectPool.java
>     commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/
> TestGenericObjectPool.java
> 
> Modified: commons/proper/pool/trunk/src/changes/changes.xml
> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
> ============================================================
> ==================
> --- commons/proper/pool/trunk/src/changes/changes.xml (original)
> +++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2 15:53:08
> 2016
> @@ -67,6 +67,10 @@ The <action> type attribute can be add,u
>        maxTotal threads try to borrow objects with different keys at the
> same
>        time and the factory destroys objects on return.
>      </action>
> +    <action dev="markt" type="fix">
> +      Ensure that any class name used for evictionPolicyClassName
> represents a
> +      class that implements EvictionPolicy.
> +    </action>
>    </release>
>    <release version="2.4.2" date="2015-08-01" description=
>   "This is a patch release, including bug fixes only.">
> 
> Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
> pool2/impl/BaseGenericObjectPool.java
> URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
> main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
> rev=1767714&r1=1767713&r2=1767714&view=diff
> ============================================================
> ==================
> --- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> (original)
> +++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
> Wed Nov  2 15:53:08 2016
> @@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
>                  final
>                  EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>) policy;
>                  this.evictionPolicy = evicPolicy;
> +            } else {
> +                throw new IllegalArgumentException("[" +
> evictionPolicyClassName +
> +                        "] does not implement EvictionPolicy");
>              }
>          } catch (final ClassNotFoundException e) {
>              throw new IllegalArgumentException(
> 
> 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=1767714&r1=1767713&r2=1767714&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
> Wed Nov  2 15:53:08 2016
> @@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
>              // expected
>          }
> 
> +        try {
> +            pool.setEvictionPolicyClassName(java.lang.String.class.
> getName());
> +            fail("setEvictionPolicyClassName must throw an error if a
> class that does not "
> +                    + "implement EvictionPolicy is specified.");
> +        } catch (final IllegalArgumentException e) {
> +            // expected
> +        }
> +
>          pool.setEvictionPolicyClassName(TestEvictionPolicy.class.
> getName());
>          assertEquals(TestEvictionPolicy.class.getName(), pool.
> getEvictionPolicyClassName());
> 
> @@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
>          public SimpleFactory() {
>              this(true);
>          }
> -
> +
>          public SimpleFactory(final boolean valid) {
>              this(valid,valid);
>          }
> -
> +
>          public SimpleFactory(final boolean evalid, final boolean ovalid) {
>              evenValid = evalid;
>              oddValid = ovalid;
>          }
> -
> +
>          public synchronized void setValid(final boolean valid) {
>              setEvenValid(valid);
>              setOddValid(valid);
>          }
> -
> +
>          public synchronized void setEvenValid(final boolean valid) {
>              evenValid = valid;
>          }
> -
> +
>          public synchronized void setOddValid(final boolean valid) {
>              oddValid = valid;
>          }
> -
> +
>          public synchronized void setThrowExceptionOnPassivate(final
> boolean bool) {
>              exceptionOnPassivate = bool;
>          }
> -
> +
>          public synchronized void setMaxTotal(final int maxTotal) {
>              this.maxTotal = maxTotal;
>          }
> -
> +
>          public synchronized void setDestroyLatency(final long
> destroyLatency) {
>              this.destroyLatency = destroyLatency;
>          }
> -
> +
>          public synchronized void setMakeLatency(final long makeLatency) {
>              this.makeLatency = makeLatency;
>          }
> -
> +
>          public synchronized void setValidateLatency(final long
> validateLatency) {
>              this.validateLatency = validateLatency;
>          }
> -
> +
>          @Override
>          public PooledObject<String> makeObject() {
>              final long waitLatency;
> @@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
>              }
>              return new DefaultPooledObject<String>(
> String.valueOf(counter));
>          }
> -
> +
>          @Override
>          public void destroyObject(final PooledObject<String> obj) throws
> Exception {
>              final long waitLatency;
> @@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
>                  throw new Exception();
>              }
>          }
> -
> +
>          @Override
>          public boolean validateObject(final PooledObject<String> obj) {
>              final boolean validate;
> @@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
>              }
>              return true;
>          }
> -
> +
>          @Override
>          public void activateObject(final PooledObject<String> obj) throws
> Exception {
>              final boolean hurl;
> @@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
>                  }
>              }
>          }
> -
> +
>          @Override
>          public void passivateObject(final PooledObject<String> obj) throws
> Exception {
>              final boolean hurl;
> 
> 
> 
> 
> 


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


Fwd: svn commit: r1767714 - in /commons/proper/pool/trunk/src: changes/changes.xml main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Posted by Gary Gregory <ga...@gmail.com>.
Is it time to push out 2.4.3? There are couple of interesting fixes.

Gary
---------- Forwarded message ----------
From: <ma...@apache.org>
Date: Wed, Nov 2, 2016 at 8:53 AM
Subject: svn commit: r1767714 - in /commons/proper/pool/trunk/src:
changes/changes.xml
main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java
To: commits@commons.apache.org


Author: markt
Date: Wed Nov  2 15:53:08 2016
New Revision: 1767714

URL: http://svn.apache.org/viewvc?rev=1767714&view=rev
Log:
Check class used for evictionPolicyClassName implements EvictionPolicy

Modified:
    commons/proper/pool/trunk/src/changes/changes.xml
    commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/
BaseGenericObjectPool.java
    commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/
TestGenericObjectPool.java

Modified: commons/proper/pool/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
changes/changes.xml?rev=1767714&r1=1767713&r2=1767714&view=diff
============================================================
==================
--- commons/proper/pool/trunk/src/changes/changes.xml (original)
+++ commons/proper/pool/trunk/src/changes/changes.xml Wed Nov  2 15:53:08
2016
@@ -67,6 +67,10 @@ The <action> type attribute can be add,u
       maxTotal threads try to borrow objects with different keys at the
same
       time and the factory destroys objects on return.
     </action>
+    <action dev="markt" type="fix">
+      Ensure that any class name used for evictionPolicyClassName
represents a
+      class that implements EvictionPolicy.
+    </action>
   </release>
   <release version="2.4.2" date="2015-08-01" description=
  "This is a patch release, including bug fixes only.">

Modified: commons/proper/pool/trunk/src/main/java/org/apache/commons/
pool2/impl/BaseGenericObjectPool.java
URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/
main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java?
rev=1767714&r1=1767713&r2=1767714&view=diff
============================================================
==================
--- commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
(original)
+++ commons/proper/pool/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java
Wed Nov  2 15:53:08 2016
@@ -613,6 +613,9 @@ public abstract class BaseGenericObjectP
                 final
                 EvictionPolicy<T> evicPolicy = (EvictionPolicy<T>) policy;
                 this.evictionPolicy = evicPolicy;
+            } else {
+                throw new IllegalArgumentException("[" +
evictionPolicyClassName +
+                        "] does not implement EvictionPolicy");
             }
         } catch (final ClassNotFoundException e) {
             throw new IllegalArgumentException(

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=1767714&r1=1767713&r2=1767714&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
Wed Nov  2 15:53:08 2016
@@ -1080,6 +1080,14 @@ public class TestGenericObjectPool exten
             // expected
         }

+        try {
+            pool.setEvictionPolicyClassName(java.lang.String.class.
getName());
+            fail("setEvictionPolicyClassName must throw an error if a
class that does not "
+                    + "implement EvictionPolicy is specified.");
+        } catch (final IllegalArgumentException e) {
+            // expected
+        }
+
         pool.setEvictionPolicyClassName(TestEvictionPolicy.class.
getName());
         assertEquals(TestEvictionPolicy.class.getName(), pool.
getEvictionPolicyClassName());

@@ -1704,49 +1712,49 @@ public class TestGenericObjectPool exten
         public SimpleFactory() {
             this(true);
         }
-
+
         public SimpleFactory(final boolean valid) {
             this(valid,valid);
         }
-
+
         public SimpleFactory(final boolean evalid, final boolean ovalid) {
             evenValid = evalid;
             oddValid = ovalid;
         }
-
+
         public synchronized void setValid(final boolean valid) {
             setEvenValid(valid);
             setOddValid(valid);
         }
-
+
         public synchronized void setEvenValid(final boolean valid) {
             evenValid = valid;
         }
-
+
         public synchronized void setOddValid(final boolean valid) {
             oddValid = valid;
         }
-
+
         public synchronized void setThrowExceptionOnPassivate(final
boolean bool) {
             exceptionOnPassivate = bool;
         }
-
+
         public synchronized void setMaxTotal(final int maxTotal) {
             this.maxTotal = maxTotal;
         }
-
+
         public synchronized void setDestroyLatency(final long
destroyLatency) {
             this.destroyLatency = destroyLatency;
         }
-
+
         public synchronized void setMakeLatency(final long makeLatency) {
             this.makeLatency = makeLatency;
         }
-
+
         public synchronized void setValidateLatency(final long
validateLatency) {
             this.validateLatency = validateLatency;
         }
-
+
         @Override
         public PooledObject<String> makeObject() {
             final long waitLatency;
@@ -1767,7 +1775,7 @@ public class TestGenericObjectPool exten
             }
             return new DefaultPooledObject<String>(
String.valueOf(counter));
         }
-
+
         @Override
         public void destroyObject(final PooledObject<String> obj) throws
Exception {
             final long waitLatency;
@@ -1786,7 +1794,7 @@ public class TestGenericObjectPool exten
                 throw new Exception();
             }
         }
-
+
         @Override
         public boolean validateObject(final PooledObject<String> obj) {
             final boolean validate;
@@ -1809,7 +1817,7 @@ public class TestGenericObjectPool exten
             }
             return true;
         }
-
+
         @Override
         public void activateObject(final PooledObject<String> obj) throws
Exception {
             final boolean hurl;
@@ -1828,7 +1836,7 @@ public class TestGenericObjectPool exten
                 }
             }
         }
-
+
         @Override
         public void passivateObject(final PooledObject<String> obj) throws
Exception {
             final boolean hurl;





-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory