lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-1553) ConcurrentScheduleManager.addMyself() has wrong inted
Date Thu, 05 Mar 2009 09:55:57 GMT

     [ 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


Mime
View raw message