You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ds...@apache.org on 2022/03/10 20:13:11 UTC

[solr] branch branch_9_0 updated: SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)

This is an automated email from the ASF dual-hosted git repository.

dsmiley pushed a commit to branch branch_9_0
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9_0 by this push:
     new 8f19671  SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)
8f19671 is described below

commit 8f19671a1dd7328d2ef3bba2bbfd42fedee4901d
Author: David Smiley <ds...@salesforce.com>
AuthorDate: Thu Mar 10 15:09:47 2022 -0500

    SOLR-14290: Fix NPE by external users of SolrTestCaseJ4 (#739)
---
 solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index 5bb64de..2f57c8d 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -283,7 +283,9 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
             true);
 
     // set solr.install.dir needed by some test configs outside of the test sandbox (!)
-    System.setProperty("solr.install.dir", ExternalPaths.SOURCE_HOME);
+    if (ExternalPaths.SOURCE_HOME != null) {
+      System.setProperty("solr.install.dir", ExternalPaths.SOURCE_HOME);
+    }
     // not strictly needed by this class at this point in the control lifecycle, but for
     // backcompat create it now in case any third party tests expect initCoreDataDir to be
     // non-null after calling setupTestCases()