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

Fix NPE in DataFormatMatcher#getMatchedFormatName when no match exists #591

Conversation

sleberknight
Copy link
Contributor

  • Change DataFormatMatcher#getMatchedFormatName so it does what
    the Javadoc says, because otherwise it throws a NullPointerException
    when there is no match (and the _match field is null)
  • Added tests for when there is a match, and when there isn't

* Change DataFormatMatcher#getMatchedFormatName so it does what
  the Javadoc says, because otherwise it throws a NullPointerException
  when there is no match (and the _match field is null)
* Added tests for when there is a match, and when there isn't
@cowtowncoder
Copy link
Member

Yes, makes total change. Will merge as suggested.

@cowtowncoder cowtowncoder merged commit e86c5a1 into FasterXML:2.11 Jan 10, 2020
cowtowncoder pushed a commit that referenced this pull request Jan 10, 2020
#591)

Change DataFormatMatcher#getMatchedFormatName so it does what the Javadoc says to avoid NPE for non-match; add unit tests to verify.
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.

None yet

2 participants