Skip to content

used EnvUtils for system properties in core#4629

Open
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:envutils-core-properties
Open

used EnvUtils for system properties in core#4629
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:envutils-core-properties

Conversation

@iprithv

@iprithv iprithv commented Jul 9, 2026

Copy link
Copy Markdown

replaced direct System.getProperty(...) / System.getenv calls for Solr configuration properties with EnvUtils equivalents throughout the core module. this provides consistent support for SOLR_* environment variables (and the automatic SOLR_FOO_BARsolr.foo.bar conversion) in all core startup and configuration paths.

String solrHome = cli.getOptionValue(SOLR_HOME_OPTION);
if (StrUtils.isNullOrEmpty(solrHome)) {
solrHome = System.getProperty("solr.home");
solrHome = EnvUtils.getProperty("solr.home", EnvUtils.getProperty("solr.solr.home"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solr.solr.home thing was always a bit werid... But is a "thing". What prompted this change here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my bad, I've fixed ZkCpTool to use EnvUtils.getProperty("solr.home") to preserve the original behaviour. Thanks!

@iprithv iprithv force-pushed the envutils-core-properties branch from e2d9407 to 8df1569 Compare July 13, 2026 23:45
@iprithv iprithv requested a review from epugh July 13, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants