You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/03/05 10:55:57 UTC

[jira] Resolved: (LUCENE-1553) ConcurrentScheduleManager.addMyself() has wrong inted

     [ https://issues.apache.org/jira/browse/LUCENE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1553.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9

> ConcurrentScheduleManager.addMyself() has wrong inted
> -----------------------------------------------------
>
>                 Key: LUCENE-1553
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1553
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Scott Garland
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>
> This method has the wrong index for the 'size' variable, I think it should b allInstances.size.
> {code:java}
> private void addMyself() {
>     synchronized(allInstances) {
>       final int size=0;
>       int upto = 0;
>       for(int i=0;i<size;i++) {
>         final ConcurrentMergeScheduler other = (ConcurrentMergeScheduler) allInstances.get(i);
>         if (!(other.closed && 0 == other.mergeThreadCount()))
>           // Keep this one for now: it still has threads or
>           // may spawn new threads
>           allInstances.set(upto++, other);
>       }
>       allInstances.subList(upto, allInstances.size()).clear();
>       allInstances.add(this);
>     }
>   }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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