Skip to content

Conversation

@ndegwamartin
Copy link
Collaborator

Description of what I changed

Resolves #1474

E2E test

TESTED:

Please replace this with a description of how you tested your PR beyond the
automated e2e/unit tests.

Checklist: I completed these to help reviewers :)

  • I have read and will follow the
    review process.

  • I am familiar with Google Style Guides for the language I have coded in.

    No? Please take some time and review
    Java and
    Python style guides.

  • My IDE is configured to follow the Google
    code styles.

    No? Unsure? ->
    configure your IDE.

  • I have added tests to cover my changes. (If you refactored existing
    code that was well tested you do not have to add tests)

  • I ran mvn clean package right before creating this pull request and
    added all formatting changes to my commit.

  • If I made any Python code changes, I ran black . and pylint . right
    before creating this pull request and added all formatting changes to my
    commit.

  • All new and existing tests passed.

  • My pull request is based on the latest changes of the master branch.

    No? Unsure? -> execute command git pull --rebase upstream master

@ndegwamartin ndegwamartin requested a review from bashir2 October 6, 2025 17:24
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 43.75000% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.56%. Comparing base (a70dab1) to head (6ab5f10).

Files with missing lines Patch % Lines
...erner/bunsen/definitions/StructureDefinitions.java 40.00% 2 Missing and 4 partials ⚠️
...ner/bunsen/definitions/HapiContainedConverter.java 0.00% 4 Missing ⚠️
...r/bunsen/avro/tools/GenerateAggregatedSchemas.java 0.00% 3 Missing ⚠️
...a/com/cerner/bunsen/definitions/EnumConverter.java 0.00% 0 Missing and 2 partials ⚠️
...bunsen/definitions/r4/R4FhirConversionSupport.java 0.00% 1 Missing ⚠️
...en/definitions/stu3/Stu3FhirConversionSupport.java 0.00% 1 Missing ⚠️
...java/com/cerner/bunsen/ProfileMappingProvider.java 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1491      +/-   ##
============================================
- Coverage     46.66%   46.56%   -0.10%     
  Complexity      676      676              
============================================
  Files            90       90              
  Lines          5874     5882       +8     
  Branches        814      823       +9     
============================================
- Hits           2741     2739       -2     
- Misses         2828     2833       +5     
- Partials        305      310       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ndegwamartin ndegwamartin marked this pull request as ready for review October 10, 2025 17:22
Copy link
Collaborator

@bashir2 bashir2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just sharing some preliminary comments as we discussed.

<showWarnings>true</showWarnings>
<release>${compile.source}</release>

<source>${compile.source}</source>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little bit torn on this as I like to keep bunsen and pipelines modules separate. But for build plugins, especially those with a lot of configurations, I think it is worth refactor them into one place. That is what we have done for the spotless formatter (which is in the root pom.xml). Let's do the same for the ErrorProne/NullAway as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will get a NPE if getElementType() returns null here; so we should handle it if we allow null in the base class; ditto on line 77 above. Can you please check all usages of getElementType and make sure that null is handled?

IBase parentObject, BaseRuntimeChildDefinition fieldToSet, Object sparkObject) {}

@Override
@Nullable // TODO superclass returns non-nullable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I suppose we should mark the parent as @Nullable as well and deal with its usage, right? Or can you remind me if we discussed another option last week? (ditto for other similar TODOs).

List<String> resourceTypeURLs =
ProfileMapperFhirContexts.getInstance()
.getMappedProfilesForResource(FhirVersionEnum.R4, resourceType);
if (resourceTypeURLs == null || resourceTypeURLs.isEmpty()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is for debug; you can use logger.debug() too.

@ndegwamartin
Copy link
Collaborator Author

/gcbrun

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.

Fix NullAway Warnings for Null Pointer Exceptions

3 participants