[ https://issues.apache.org/jira/browse/LUCENE-2057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-2057. ----------------------------------- Resolution: Fixed Committed revision: 835090 Thanks Shai! As this is not a new bug, I added you to the changes entry for the Java 5 generics additions. > TopDocsCollector should have bounded generic <T extends ScoreDoc> > ----------------------------------------------------------------- > > Key: LUCENE-2057 > URL: https://issues.apache.org/jira/browse/LUCENE-2057 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Reporter: Shai Erera > Assignee: Uwe Schindler > Fix For: 3.0 > > Attachments: scoredoc.patch > > > TopDocsCollector was changed to be TopDocsCollector<T>. However it has > methods which specifically assume the PQ stores ScoreDoc. Therefore, if > someone extends it and defines a type which is not ScoreDoc, things will > break. > We shouldn't put <T> on TopDocsCollector at all, but rather change its ctor > to *protected TopDocsCollector(PriorityQueue<? extends ScoreDoc> pq)*. > TopDocsCollector should handle ScoreDoc types. If we do this, we'll need to > change FieldValueHitQueue's Entry to extend ScoreDoc as well. -- 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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org