Skip to content

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

Closed
@TysonAndre

Description

@TysonAndre

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions