BFD-2720: Fix bug with samhsa matcher class cast in RDA logic #1812
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA Ticket:
BFD-2720
User Story or Bug Summary:
After a recent adjustment to the RDA code to use dependency injection, one of the side effects was a mis-cast on some logic that changed as a result of the transformer injection. This fixes that.
What Does This PR Do?
Root cause of this issue was injecting a single transformer based on the resource type into the resource provider. The samhsa matcher REQUIRES the resource to be transformed into a claim, so when resources were passed into the samhsa matcher of a claimResponse resource provider, it used the claimResponse transformer, attempted to cast it to a claim after, and blew up.
This fixes that by moving the samhsa determination logic into the samhsa matcher, and injects the appropriate transformers into THAT class instead of needing the resourceProvider to always have a claim transformer handy.
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
What Security Implications Does This PR Have?
Submitters should complete the following questionnaire:
If the answer to any of the questions below is Yes, then you must supply a link to the associated Security Impact Assessment (SIA), security checklist, or other similar document in Confluence here: N/A
If the answer to any of the questions below is Yes, then please add @StewGoin as a reviewer, and note that this PR should not be merged unless/until he also approves it.
What Needs to Be Merged and Deployed Before this PR?
This PR cannot be either merged or deployed until the following prerequisite changes have been fully deployed:
Submitter Checklist
I have gone through and verified that...:
BFD-123: Adds foo
README
updates and changelog / release notes entries.TODO
and/orFIXME
comments, which include a JIRA ticket ID for any items that require urgent attention.