You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NP Ill open a PR later this week.
Not sure about the default value, i'd write "N/A" but it requires changing the type to String. I prefer to change as little as possible since i didn't go over the code to see what else may be affected.
The
fetchVersion()
method will fail with NPE when the API server doesn't return the build date.kubernetes-client/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ClusterOperationsImpl.java
Line 44 in 74cc63d
It happens because
SimpleDateFormat
can't parse null values.A possible fix can be null checking before calling
buildWithDate
:kubernetes-client/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/ClusterOperationsImpl.java
Line 66 in 74cc63d
Or within the
buildWithDate
function itself if a default value should be provided:kubernetes-client/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/VersionInfo.java
Line 104 in 74cc63d
This can be reproduced if k8s is mocked with the provided server in CRUD mode - https://github.com/fabric8io/kubernetes-client#crud-mode
The text was updated successfully, but these errors were encountered: