avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/mpool BlockingFixedSizePool.java
Date Wed, 14 Aug 2002 17:04:12 GMT
bloritsch    2002/08/14 10:04:12

  Modified:    event/src/java/org/apache/excalibur/mpool
                        BlockingFixedSizePool.java
  Log:
  fix bug 11694 and protect from forwarding a BufferUnderflowException
  
  Revision  Changes    Path
  1.3       +7 -3      jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/mpool/BlockingFixedSizePool.java
  
  Index: BlockingFixedSizePool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/mpool/BlockingFixedSizePool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BlockingFixedSizePool.java	14 Aug 2002 16:59:55 -0000	1.2
  +++ BlockingFixedSizePool.java	14 Aug 2002 17:04:11 -0000	1.3
  @@ -51,6 +51,7 @@
   
   import org.apache.avalon.excalibur.concurrent.Mutex;
   import org.apache.avalon.excalibur.collections.Buffer;
  +import org.apache.avalon.excalibur.collections.BufferUnderflowException;
   import org.apache.avalon.excalibur.collections.FixedSizeBuffer;
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  @@ -156,12 +157,15 @@
                           }
                       } while ( m_buffer.isEmpty() );
                   }
  +            }
   
  +            try
  +            {
                   object = m_buffer.remove();
               }
  -            else
  +            catch (BufferUnderflowException bufe)
               {
  -                object = m_buffer.remove();
  +                // ignore exception and leave object as null
               }
           }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message