-
Notifications
You must be signed in to change notification settings - Fork 218
fix: condition for bulk resources #1688
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
closes #1687 |
The test for some reason does not fail. Will investigate also that. |
d83b9f8
to
42a4e17
Compare
return condition.map(c -> c.isMet(primary, | ||
dependentResource.getSecondaryResource(primary, context).orElse(null), | ||
context)) | ||
(R) resources, context)) |
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.
This shouldn't work because R
can never be a Map
in a DependentResource
declaration so this should most likely cause a ClassCastException
.
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.
That thing does not get into the bytecode, but also there is a test for this in the PR. Will try to make it more nice though.
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.
Checked but this is still the simplest way to do locally, this will change probably within this issue:
#1689
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.
will improve this sample so it shows more the issue with the Bulk resources.
@metacosm improved the test, commented it, would be quite unefficient to do a real life example, but I think here the main point is the API to show in the IT. |
Kudos, SonarCloud Quality Gate passed! |
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 after we make it clearer that this is a temporary fix to be addressed better in #1690
Note that this is a temp fix for 4.2. A proper fix with API change will come in 4.3 probably with this PR:
#1690