databricks-sdk-java
databricks-sdk-java copied to clipboard
[ISSUE] NullPointerException in UserAgent.env() when PATH environment variable is missing
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.