danmuzi commented on a change in pull request #338:
URL: https://github.com/apache/lucene/pull/338#discussion_r719541562
##########
File path: lucene/core/src/java/org/apache/lucene/search/Sort.java
##########
@@ -108,20 +55,6 @@ public Sort() {
/** Sorts by the criteria in the given SortField. */
public Sort(SortField field) {
Review comment:
By changing the method below to a constructor, this constructor seems to
be no longer needed.
Our new variable arguments constructor can cover it.
Even without this, all the following cases can be covered.
```java
new Sort(); // Pass
new Sort(new SortField("fld", SortField.Type.STRING)); // Pass
new Sort(new SortField[]{new SortField("fld", SortField.Type.STRING), new
SortField("fld2", SortField.Type.INT)}); // Pass
new Sort(new SortField("fld", SortField.Type.STRING), new SortField("fld2",
SortField.Type.INT)); // Pass
new Sort(new SortField[0]); // IllegalArgumentException
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]