databricks-sdk-java icon indicating copy to clipboard operation
databricks-sdk-java copied to clipboard

[ISSUE] NullPointerException in UserAgent.env() when PATH environment variable is missing

Open lk255018 opened this issue 4 weeks ago • 0 comments

Description When running on a system where the PATH environment variable is not set, the following code in UserAgent.env() causes a NullPointerException: System.getenv("PATH").split(File.pathSeparator) System.getenv("PATH").split(File.pathSeparator)

If System.getenv("PATH") returns null, calling .split() throws an exception.

Reproduction Unset the PATH environment variable. Run any code that triggers UserAgent.env().

Expected behavior The code should handle missing PATH gracefully, e.g., by using an empty array.

Is it a regression? this is introduced in databricks-sdk-java-0.40.0.jar

Debug Logs

Other Information

  • OS: [e.g. macOS]
  • Version: I am using 0.67.3 version

Additional context Add any other context about the problem here.

lk255018 avatar Nov 12 '25 20:11 lk255018