tflobbe commented on a change in pull request #817: SOLR-13655:Upgrade Collections.unModifiableSet to Set.of and Set.copyOf URL: https://github.com/apache/lucene-solr/pull/817#discussion_r316982600
########## File path: solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Variable.java ########## @@ -277,7 +276,7 @@ default Operand getOperand(Operand expected, Object strVal, ComputedType compute this.metricsAttribute = readStr(meta.metricsKey()); this.supportedComputedTypes = meta.computedValues()[0] == ComputedType.NULL ? emptySet() : - unmodifiableSet(new HashSet(Arrays.asList(meta.computedValues()))); + Set.copyOf(Arrays.asList(meta.computedValues())); Review comment: this could be `Set.of(meta.computedValues())`, right? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org