Skip to content

Fix GlobalSettings crash when JFrog CLI is not installed (XRAY-145646)#530

Closed
Jordanh1996 wants to merge 1 commit into
masterfrom
fix/XRAY-145646-global-settings-npe
Closed

Fix GlobalSettings crash when JFrog CLI is not installed (XRAY-145646)#530
Jordanh1996 wants to merge 1 commit into
masterfrom
fix/XRAY-145646-global-settings-npe

Conversation

@Jordanh1996

Copy link
Copy Markdown
Contributor

Summary

Fixes XRAY-145646 — IntelliJ plugin 2.9.0 fails to start on Windows with:

PluginException: Cannot init component state (GlobalSettings)
Caused by: NullPointerException: Cannot invoke Log.error() because "this.log" is null
  at JfrogCliDriver.runVersion → isJfrogCliInstalled

Root cause: ide-plugins-common 2.4.x (#525) changed JfrogCliDriver(Map, String path) to JfrogCliDriver(Map, Log). ServerConfigImpl.readConnectionDetailsFromJfrogCli() still passed null as the second argument — previously the CLI path, now the Log. When jf is not on PATH (common on Windows), isJfrogCliInstalled() calls log.error() and NPEs during GlobalSettings init.

Fix: Pass new NullLog() instead of null when constructing JfrogCliDriver.

Test plan

  • Reproduced NPE on Windows VM without jf on PATH (broken 2.9.0 build)
  • Verified fixed build: IntelliJ starts, Global Configuration saves and persists across restart
  • ConnectionDetailsFromCliTest updated and passes

Made with Cursor

After ide-plugins-common 2.4.x, JfrogCliDriver's second constructor arg is Log, not CLI path.
Passing null caused NPE in isJfrogCliInstalled() on Windows where jf is often missing from PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jordanh1996

Copy link
Copy Markdown
Contributor Author

Closing: reopening from personal fork (Jordanh1996/jfrog-idea-plugin).

@Jordanh1996 Jordanh1996 deleted the fix/XRAY-145646-global-settings-npe branch June 16, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant