PreventionDisplayConfig.java null checks#212
Open
phc007 wants to merge 1 commit intoopen-osp:mainfrom
Open
Conversation
line 167 is necessary to avoid picking up essentially partial data in CVC/NVC that don't map directly to a name line 149 The first one is for symmetry however you are not likely to have null names for XML Preventions.
Contributor
Author
|
@warrendennis |
Collaborator
|
Where is the NPE being caught? A key cannot be null. A value should be null when it is null. HashMap.containsKey('name') |
Contributor
Author
|
thanks for the review
The null is in CVC data
Its thrown in the index.page
I will look at this and submit something better
... probably your suggestion
…On Mon, Mar 9, 2026 at 7:23 PM Dennis Warren ***@***.***> wrote:
*warrendennis* left a comment (open-osp/Open-O#212)
<#212 (comment)>
Where is the NPE being caught?
A key cannot be null. A value should be null when it is null.
Wouldn't it be better to filter out ALL null keys BEFORE they are
populated into the HashMap (goto line 224)?
If the CVC file did not include a 'name' key then it would be better to
validate it with
HashMap.containsKey('name')
—
Reply to this email directly, view it on GitHub
<#212 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACURMBLG44NHTRUKUEQPODD4P5G5JAVCNFSM6AAAAACWKR4JGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMRXGU3DSMJSG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Guard prevention display population against null names and incomplete immunization data to avoid inserting invalid entries into internal collections. This is necessary to allow for data migration from OSCAR 19 for users who have CVC style Preventions, otherwise the nulls cause havoc in prevention displays and will cause a 500 for oscarPrevention/index.jsp.
Bug Fixes:
Description
line 167 is necessary to avoid picking up essentially partial data in CVC/NVC that don't map directly to a name
line 149 The first one is for symmetry although it is unlikely to be called as its based on XML configuration.