-
Notifications
You must be signed in to change notification settings - Fork 118
Fixes Error prone null checks in Bunsen module #1491
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
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.
Just sharing some preliminary comments as we discussed.
| <showWarnings>true</showWarnings> | ||
| <release>${compile.source}</release> | ||
|
|
||
| <source>${compile.source}</source> |
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.
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.
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.
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 |
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.
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()) { |
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.
I suppose this is for debug; you can use logger.debug() too.
|
/gcbrun |
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 packageright before creating this pull request andadded all formatting changes to my commit.
If I made any Python code changes, I ran
black .andpylint .rightbefore 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