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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to