Skip to content
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

FMWK-467 Issue using refs with yaml file #159

Closed
wants to merge 2 commits into from

Conversation

tim-aero
Copy link
Contributor

Fixed a null pointer exception when using refs via the YAML file, caused by BatchLoad being null and reading code incorrectly assuming a valid value.

If a policy specified either by defaultPolicy or using the policy
hierarchy has a RecordExistsAction of CREATE_ONLY, the save method was
overwriting this with REPLACE. Changed this to only replace the policy
with REPLACE if the passed RecordExistsAction is UPDATE.
Whilst references work correctly with annotations, they would throw a
NullPointerException when being used with an external configuration such
as a YAML file. The issue was caused by the `BatchLoad` property which
was initialized by default to true on the annotation but was left as
null if not specified in the file
@tim-aero tim-aero requested a review from roimenashe June 14, 2024 16:39
@roimenashe
Copy link
Contributor

@tim-aero I have no problem with the refs with yaml file changes but this PR contains changes of #158 which we might not push to main at this point (we still haven't reviewed the refactor alternatives, didn't have the capacity and the user has a workaround for now).

issue-using-refs-with-yaml-file branch should've been created from main instead of issue-with-insert-only-policy to contain specific changes to solve this issue.

@roimenashe roimenashe changed the title Issue using refs with yaml file FMWK-467 Issue using refs with yaml file Jun 18, 2024
@roimenashe
Copy link
Contributor

See #161

@roimenashe roimenashe closed this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants