Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

NPE in DefaultConverter's and JacksonConverter's toRepresentation() if Variant target is null #567

Open
adennie opened this Issue · 0 comments

2 participants

Andy Dennie Jerome Louvel
Andy Dennie

When provided a null Variant target parameter as input, the score(Object source, Variant target, Resource resource) method of DefaultConverter returns a positive number if source is an "instanceof" String or File or Form or InputStream or Reader or Representation or Serializable.

However, if the ConverterService then invokes toRepresentation(), passing the same source and target Variant (null), it will generate an NPE if the source is a String, File, InputStream, Reader, or Serializable, because in each of those cases toRepresentation() will call target.getMediaType().

An analogous issue exists in JacksonConverter.

Jerome Louvel jlouvel modified the milestone: Unplanned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.