-
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
All lists to omit empty by default #5320
Conversation
It's my understanding that the current state of the PR is with the minimum set of breaking changes (i.e. collections are still initialized). I'd delay further (more aggressive) changes to a subsequent PR |
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.
Trusting your word that this PR only affects the @JsonInclude(JsonInclude.Include.NON_EMPTY)
annotation, looks good to me.
This change will be breaking for someone those who were relying upon empty collections
Sure you can trust me. I also have some good deals on real estate :) |
So I guess that we're more or less fine once we add the changelog + breaking note |
4c6da3f
to
acb9213
Compare
Should be good now. |
Kudos, SonarCloud Quality Gate passed! |
Description
Closes #5262
There was only one real change to Fabric8DefaultRule, and one test updated to SerializationTest. Everything else is the update of the models - which was surprisingly quite extensive.
To add a little more the root casue of this behavior:
So the alternative would be to set initializeCollections to false and have the Fabric8DefaultRule take over that responsibility and not initialize fields that are not set to omit empty. That of course could also potentially be seen as breaking behavior as users will be required to do null checks that they didn't have to do before.
Changing the getter to use Optional would be even more breaking, but could be considered as well.
@manusa @metacosm @rohanKanojia any thoughts about this? Whatever the decision, I'll add some appropriate change log entries.
Type of change
test, version modification, documentation, etc.)
Checklist