HoustonPutman commented on a change in pull request #1716: URL: https://github.com/apache/lucene-solr/pull/1716#discussion_r466657348
########## 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: I think that's the logic Gus used. It's equivalent to: ```java 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)); } } } ``` This will error unless there are exactly 3 keys and once of them is `strict`. ---------------------------------------------------------------- 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