-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: Template getObjects doesn't throw NPE when objects is null #3606
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
Conversation
Can one of the admins verify this patch? |
c7829fb
to
9dff1bd
Compare
@rohanKanojia @manusa this may be a silly question, but why is sorting required? |
No idea, I guess that at some point the order on which the items was applied was important. |
If a reference can't be found, I'd say this behavior seems undesirable. Based upon HasMetadataComparator (which seems somewhat arbitrary) it look like a pretty print option that was added to KubernetesList and Template. Ideally it should optional or the user's responsibility. |
At this point this would be a breaking change, and I'm sure some projects rely on this (JKube at some extent does). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the consideration that sorting may be optional or removed in the future.
9dff1bd
to
885be1f
Compare
This failing test highlights an existing BUG. When calling Template#getObjects method with a null objects field, an NPE is thrown. Signed-off-by: Marc Nuri <marc@marcnuri.com>
Signed-off-by: Marc Nuri <marc@marcnuri.com>
885be1f
to
f5d254b
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
fix: Template getObjects doesn't throw NPE when objects is null
Type of change
test, version modification, documentation, etc.)
Checklist