stefanvodita commented on code in PR #13041:
URL: https://github.com/apache/lucene/pull/13041#discussion_r1487566325


##########
lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/nodes/TokenizedPhraseQueryNode.java:
##########
@@ -70,10 +70,8 @@ public QueryNode cloneTree() throws 
CloneNotSupportedException {
   @Override
   public CharSequence getField() {
     List<QueryNode> children = getChildren();
-
-    if (children == null || children.size() == 0) {
+    if (children == null || children.isEmpty()) {
       return null;
-
     } else {
       return ((FieldableNode) children.get(0)).getField();

Review Comment:
   I see your point. Maybe it's worth adding an assertion?



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