gus-asf commented on a change in pull request #1716: URL: https://github.com/apache/lucene-solr/pull/1716#discussion_r465871109
########## File path: solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java ########## @@ -117,10 +117,10 @@ private Clause(Map<String, Object> m) { strict = Boolean.parseBoolean(String.valueOf(m.getOrDefault("strict", "true"))); Optional<String> globalTagName = m.keySet().stream().filter(Policy.GLOBAL_ONLY_TAGS::contains).findFirst(); if (globalTagName.isPresent()) { - globalTag = parse(globalTagName.get(), m); - if (m.size() > 2) { - throw new RuntimeException("Only one extra tag supported for the tag " + globalTagName.get() + " in " + toJSONString(m)); + if (m.size() > 3) { Review comment: from my very limited understanding of this code it appears that something like ``` if (globalTagName.isPresent()) { validateGlobalTag(m, globalTagName.get()); globalTag = parse(globalTagName.get(), m); ... and ... private void validateGlobalTag(Map<String, Object> m, String tagName) { if (m.size() > 2) { if (!m.containsKey("strict") || m.size() > 3) { throw new RuntimeException("Only, 'strict' and one extra tag supported for the tag " + tagName + " in " + toJSONString(m)); } } } ``` would be the real intention here... but it would be great if @sigram could confirm that. ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org