Scarab commit: svn commit: r10568 - trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java

[email protected]
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: hair
Date: 2008-05-08 00:42:41-0700
New Revision: 10568

Modified:
   trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java

Log:
fix leaking count of open IssueSearch instances.
 - http://scarab.tigris.org/servlets/ReadMsg?list=dev&msgNo=14364

Modified: trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java?view=diff&rev=10568&p1=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&p2=trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java&r1=10567&r2=10568
==============================================================================
--- trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java	(original)
+++ trunk/src/java/org/tigris/scarab/util/word/IssueSearchFactory.java	2008-05-08 00:42:41-0700
@@ -159,6 +159,9 @@
             }
             if(System.currentTimeMillis() - starttime > maxWait) 
             {
+                // the caller is expected in a final block to decrement the count 
+                //  regardless if a valid IssueSearch was returned or not or whatever exception was thrown.
+                numActive++;
                 throw new MaxConcurrentSearchException(
                     L10NKeySet.ExceptionMaxConcurrentSearch,
                     ""+this.getMaxWait()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.