madrob commented on a change in pull request #1191: SOLR-14197 Reduce API of SolrResourceLoader URL: https://github.com/apache/lucene-solr/pull/1191#discussion_r384802588
########## File path: solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java ########## @@ -201,24 +198,19 @@ void addToClassLoader(List<URL> urls) { .collect(Collectors.toList())); } - /** - * Adds URLs to the ResourceLoader's internal classloader. This method <b>MUST</b> - * only be called prior to using this ResourceLoader to get any resources, otherwise - * its behavior will be non-deterministic. You also have to {link @reloadLuceneSPI} - * before using this ResourceLoader. - * - * @param urls the URLs of files to add - */ - void addToClassLoader(URL... urls) { - addToClassLoader(Arrays.asList(urls)); - } - /** * Reloads all Lucene SPI implementations using the new classloader. * This method must be called after {@link #addToClassLoader(List)} * and before using this ResourceLoader. */ void reloadLuceneSPI() { + // TODO improve to use a static Set<URL> to check when we need to + if (!needToReloadLuceneSPI) { Review comment: is this thread safe? worst case we end up reloading more often than necessary, which isn't a big deal, 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: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org