oci-java-sdk
oci-java-sdk copied to clipboard
Inability to load sdk.properties leads to NPE instead of "Unknown"
This was initially observed for OCI Java SDK v2.30.0, but looking at code for v2.41.1 it could still happen in this class and line:
https://github.com/oracle/oci-java-sdk/blob/v2.41.1/bmc-common/src/main/java/com/oracle/bmc/ClientRuntime.java#L93
i.e. this one:
propertyStream.close();
as if sdk.properties resource is not found within Jar/classpath/etc. - then stream will be null and trying to close it will result in exception, which is not captured, like such:
java.lang.NullPointerException: inStream parameter is null
at [email protected]/java.util.Objects.requireNonNull(Objects.java:233)
at [email protected]/java.util.Properties.load(Properties.java:407)
at [email protected]/com.oracle.bmc.ClientRuntime.sdkVersion(ClientRuntime.java:88)
Hello,
Our team will take a look and get back to you. Thanks for reporting the issue.