Skip to content

Mention issue 2348 (assertNotNull) in release notes for 2.10? #2510

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

Closed
TysonAndre opened this issue Oct 18, 2019 · 4 comments
Closed

Mention issue 2348 (assertNotNull) in release notes for 2.10? #2510

TysonAndre opened this issue Oct 18, 2019 · 4 comments

Comments

@TysonAndre
Copy link

603b395 (Fix #2348) is part of the 2.10 release.

Observed: When I open https://github.com/FasterXML/jackson-databind/blob/master/release-notes/VERSION-2.x , I don't see the substring 2348 anywhere.
Expected: The 2.x branch and master branch update the release notes for 2.10(.0). Mention that the helper readValue will start throwing when null is passed instead of a string (it previously returned null).

I notice that readValue will start throwing in 2.10 for code such as the below, if jsonUsers is the value null (not the string "null"). The application in question doesn't expect null as an actual input, but checked for it anyway as a sanity check. I discovered this in an integration test of handling invalid inputs.

  • I agree with the fix but want it documented.
// The assertion causing the exception
    public <T> T readValue(String content, TypeReference<T> valueTypeRef)
        throws JsonProcessingException, JsonMappingException
    {
        _assertNotNull("content", content);
            List<User> users = mapper.readValue(jsonUsers, new TypeReference<List<User>>(){});`
java.lang.IllegalArgumentException: argument "content" is null
	at com.fasterxml.jackson.databind.ObjectMapper._assertNotNull(ObjectMapper.java:4413)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3187)

I didn't see anything else in github issues mentioning this or linking to that issue.

@cowtowncoder
Copy link
Member

Thank you for reporting this gap -- I added it in release notes, as well as on 2.10 wiki page (https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10) -- latter being compiled from former.

@TysonAndre
Copy link
Author

Thanks!

@kumarvinod22
Copy link

I'm using com.fasterxml.jackson.core:jackson-databind : 2.13.4.2 getting error
java.lang.IllegalArgumentException: argument "content" is null
at com.fasterxml.jackson.databind.ObjectMapper._assertNotNull(ObjectMapper.java:4829)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:

@JooHyukKim
Copy link
Member

You may check above, @kumarvinod22.
Issue has been closed 👍🏼

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

No branches or pull requests

4 participants