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

Correctly catch potentially null value #2330

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Conversation

inanemed
Copy link
Contributor

@inanemed inanemed commented Jan 5, 2022

check if referenceDatabase not null instead of referenceSnapshot.


Dev Handoff Notes (Internal Use)

Links

Testing

  • Steps to Reproduce: Not sure. The fix obviously avoids a nulls a null pointer which could happen, but I'm not sure how to set up something naturally happening in liquibase to trigger it. Not sure what could lead to a null value, but if anything does it will handle it better now. Probably needs no additional manual testing?
  • Guidance:
    • Impact: Stops potential null pointer

Dev Verification

Reviewed code.

check referenceDatabase not null instead of referenceSnapshot.
@kataggart kataggart added this to To Do in Conditioning++ via automation Jan 6, 2022
@nvoxland nvoxland changed the title Fix minor typo Correctly catch potentially null value Jan 24, 2022
Copy link
Contributor

@nvoxland nvoxland left a comment

Choose a reason for hiding this comment

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

Thanks. referenceDatabase gets called in the if statement, so checkign that it is null and not referenceSnapshot is what's neede.

@nvoxland nvoxland moved this from To Do to Code Review in Conditioning++ Jan 24, 2022
@XDelphiGrl
Copy link
Contributor

I reviewed the changes in the commit and agree, @nvoxland, that there is nothing additional to test from a QA perspective. Should there be a unit test for this change?

All automated tests passed.
No new tests required.
No manual testing required.
Passing Funcitonal Tests

@XDelphiGrl XDelphiGrl self-assigned this Feb 23, 2022
@nvoxland
Copy link
Contributor

@XDelphiGrl I think probably not a useful enough unit test. The code is trying to do a lot of things there, and a lot of it is around how it's interacting with the outside systems and the coordination between components.

I'd like to eventually be able to refactor that code to have a better separation between what we'd test as a unit and what takes integration/coordination tests. But since we don't want to get into that right now for this change, I think the existing tests cover it well enough even if they are a bit slower to test it.

@XDelphiGrl
Copy link
Contributor

@nvoxland, thank you for taking a look at adding a test; makes sense to skip since it would add little value. Moving to ready to merge.

@nvoxland nvoxland merged commit 93536d9 into liquibase:master Feb 25, 2022
Conditioning++ automation moved this from Code Review to Done Feb 25, 2022
@kataggart kataggart modified the milestones: On Deck, NEXT Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants