[ 
https://issues.apache.org/jira/browse/LUCENE-2343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849384#action_12849384
 ] 

Shai Erera commented on LUCENE-2343:
------------------------------------

In the patch you write: "topDocOrdered - Creates a TopDocCollector that 
requires in order docs" - did you mean TopScoreDocCollector? Because 
TopDocCollector is abstract ...

I think the following:
{code}
+      Class<? extends Collector> clazz = (Class<? extends Collector>) 
Class.forName(clnName);
+      collector = clazz.newInstance();
{code}
can be written as 
Class.forName(clnName).asSubclass(Collector.class).newInstance();

Also, and it's a style issue, can you remove the '== true/false' from ifs?

I'd change *if (clnName.equals("") == false)* to *if (clnName.length() > 0)*.

Why does benchmark/build.xml now relies on the compiled classes/test (of core)?

> Add support for benchmarking Collectors
> ---------------------------------------
>
>                 Key: LUCENE-2343
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2343
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/benchmark
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>         Attachments: LUCENE-2343.patch
>
>
> As the title says.

-- 
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

Reply via email to