janhoy commented on a change in pull request #557:
URL: https://github.com/apache/solr/pull/557#discussion_r790263355



##########
File path: solr/core/src/java/org/apache/solr/core/NodeConfig.java
##########
@@ -206,7 +218,16 @@ public Path getSolrDataHome() {
     return solrDataHome;
   }
 
-  /** 
+  /**
+   * Obtain the path of solr's binary installation directory, e.g. 
<code>/opt/solr</code>
+   * @return path to install dir, or null if property 'solr.install.dir' has 
not been initialized
+   */
+  public Path getSolrInstallDir() {
+    String prop = 
System.getProperty(SolrDispatchFilter.SOLR_INSTALL_DIR_ATTRIBUTE);
+    return prop != null ? Paths.get(prop) : null;

Review comment:
       Yep, I'll try with exception. Then not even tests should call this if 
they don't know that they have set it.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to