You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/01 03:10:46 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1514: SOLR-13749: Change cross-collection join query syntax to {!join method=crossCollection ...}

dsmiley commented on a change in pull request #1514:
URL: https://github.com/apache/lucene-solr/pull/1514#discussion_r433024112



##########
File path: solr/core/src/java/org/apache/solr/search/JoinQParserPlugin.java
##########
@@ -160,23 +176,40 @@ JoinParams parseJoin(QParser qparser) throws SyntaxError {
     }
   }
 
+  @Override
+  public void init(NamedList args) {
+    routerField = (String) args.get("routerField");
+    solrUrlWhitelist = new HashSet<>();
+    if (args.get("solrUrlWhitelist") != null) {
+      //noinspection unchecked
+      for (String s : (List<String>) args.get("solrUrlWhitelist")) {
+        if (!StringUtils.isEmpty(s))

Review comment:
       This is fine, really, but personally I'd just go with 1 line of code -- `solrUrlWhiteList.addAll((List<String>) args.get("solrUrlWhitelist"))` because the impact of an empty string here is safe.




----------------------------------------------------------------
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:
users@infra.apache.org



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