-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isReady logs a warning when null #3307
Comments
I'm not sure about this, since this method is named |
The interface is already defined as Boolean isReady - if a null result is not possible, it should just be boolean. |
The two proposals would be:
|
I don't like the null return value, especially with your depicted scenario. Users implementing (for whatever reason) a manual version of So (IMHO) I see option 2 as the valid way, but excluding the ResourceNotFoundException |
The root of the problem is: Line 123 in 74cc63d
waitUntilReady does a null check before calling isReady(resource) Line 962 in b9c5419
So you are saying just do the same for isReady() - Line 957 in b9c5419
And update the interface boolean and javadocs to indicate that missing means not ready - I'm fine with that resolution as well. My impression from some of the logic that we wanted users to be aware that the value was null. |
I specifically mentioned the I don't know why a Related to:
|
If I do something like: pods().inNamespace...withName...isReady() - I'll see a warning log and a false result when null.
Should isReady return null when the resource is null?
The text was updated successfully, but these errors were encountered: