zhaih commented on code in PR #12158:
URL: https://github.com/apache/lucene/pull/12158#discussion_r1113646765


##########
lucene/core/src/java/org/apache/lucene/document/KeywordField.java:
##########
@@ -169,7 +169,7 @@ public static Query newSetQuery(String field, BytesRef... 
values) {
     Objects.requireNonNull(field, "field must not be null");
     Objects.requireNonNull(values, "values must not be null");
     return new IndexOrDocValuesQuery(
-        new TermInSetQuery(field, values), new 
SortedSetDocValuesSetQuery(field, values));
+        new TermInSetQuery(field, values), new 
SortedSetDocValuesSetQuery(field, values.clone()));

Review Comment:
   Should we just move the clone into the constructor to prevent future 
mistakes?



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

Reply via email to