jpountz commented on a change in pull request #796: LUCENE-8927: Set.copyOf and 
Set.of instead of Collections.unmodifiabl…
URL: https://github.com/apache/lucene-solr/pull/796#discussion_r305266781
 
 

 ##########
 File path: 
lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DemoHTMLParser.java
 ##########
 @@ -147,7 +147,7 @@ public InputSource resolveEntity(String publicId, String 
systemId) {
     }
     
     private static final Set<String> createElementNameSet(String... names) {
-      return Collections.unmodifiableSet(new HashSet<>(Arrays.asList(names)));
+      return Set.copyOf(Arrays.asList(names));
 
 Review comment:
   actually we should probably remove this method and fix call sites to use 
`Set.of` instead?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to