You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/06/28 06:51:49 UTC

[10/18] lucene-solr:feature/autoscaling: SOLR-10272: Fix precommit (the correct way)

SOLR-10272: Fix precommit (the correct way)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ab319eab
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ab319eab
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ab319eab

Branch: refs/heads/feature/autoscaling
Commit: ab319eab2427e0da6979c78cd391de2c49da1259
Parents: 2f2e00f
Author: Ishan Chattopadhyaya <is...@apache.org>
Authored: Tue Jun 27 21:59:32 2017 +0530
Committer: Ishan Chattopadhyaya <is...@apache.org>
Committed: Tue Jun 27 21:59:32 2017 +0530

----------------------------------------------------------------------
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ab319eab/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index f8543db..01e1693 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -50,7 +50,6 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import com.google.common.base.Strings;
 import org.apache.commons.lang.StringUtils;
-import org.apache.lucene.util.SuppressForbidden;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;
 import org.apache.solr.client.solrj.request.CoreAdminRequest.WaitForState;
@@ -716,10 +715,8 @@ public class ZkController {
     return configDirPath;
   }
 
-  @SuppressForbidden(reason = "This will be loaded for unit tests, and hence an exception can be made. "
-      + "In regular server operation, there shouldn't be a situation where we reach this point.")
   private static String getDefaultConfigDirFromClasspath(String serverSubPath) {
-    URL classpathUrl = Thread.currentThread().getContextClassLoader().getResource(serverSubPath);
+    URL classpathUrl = ZkController.class.getClassLoader().getResource(serverSubPath);
     try {
       if (classpathUrl != null && new File(classpathUrl.toURI()).exists()) {
         return new File(classpathUrl.toURI()).getAbsolutePath();