You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/09/22 13:58:57 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #1037: enable more errorprone rules and fix those things that fail

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: issues-unsubscribe@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org