risdenk commented on code in PR #1037:
URL: https://github.com/apache/solr/pull/1037#discussion_r977692979
##########
solr/core/src/test/org/apache/solr/update/processor/FieldMutatingUpdateProcessorTest.java:
##########
@@ -104,14 +104,14 @@ public void testUniqValues() throws Exception {
assertNotNull(d);
- assertEquals(Arrays.asList("Hoss", "Man", "Hoss"),
d.getFieldValues("name"));
- assertEquals(Arrays.asList("Hoss", "Man"), d.getFieldValues("uniq_1_s"));
- assertEquals(Arrays.asList("Foo", "Hoss", "Man", "Bar"),
d.getFieldValues("uniq_2_s"));
- assertEquals(Arrays.asList(5.0F, 23, "string"),
d.getFieldValues("uniq_3_s"));
+ assertEquals(List.of("Hoss", "Man", "Hoss"),
List.copyOf(d.getFieldValues("name")));
Review Comment:
https://errorprone.info/bugpattern/UndefinedEquals
This changes a unknown collection for equality checking into a List which
has defined properties.
--
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]