stefanvodita commented on code in PR #13041:
URL: https://github.com/apache/lucene/pull/13041#discussion_r1489984421
##########
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 think having the two methods aligned, the way they are in your latest
commit, makes sense.
--
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]