tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <i...@buc.com>
Subject Bug / [PATCH]
Date Thu, 14 Jun 2001 18:38:23 GMT
RE: src/org/apache/tomcat/util/SimplePool.java
 * $Header:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/SimplePool.java,v
1.3 2000/05/26 17:32:17 costin Exp $
 * $Revision: 1.3 $
 * $Date: 2000/05/26 17:32:17 $

I don't think tomcat/util/SimplePool.java is used anywhere, but it has a
bug in it.  (Hopefully, that bug is not in other classes based on or
modelled on this one.)

The problem is that it will "get" the object in pool[0], but it
(silently) won't "put" anything there.



--- SimplePool.java.orig        Thu Jun 14 14:32:43 2001
+++ SimplePool.java     Thu Jun 14 14:33:28 2001
@@ -108,7 +108,7 @@
            if( current < max )
                idx=++current;
        }
-       if( idx > 0 )
+       if( idx >= 0 )
            pool[idx]=o;
     }



Mime
View raw message