johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Sandtner (JIRA)" <>
Subject [jira] [Updated] (JOHNZON-59) broken mapping of generic types in inheritence hierarchy
Date Mon, 02 Nov 2015 17:12:28 GMT


Reinhard Sandtner updated JOHNZON-59:
    Attachment: JOHNZON-59.patch

added a new test because it was easier to reproduce.

i will write more tests with other generic usecases and improve the fix but as we have this
issue in production we need a quick fix as first step

> broken mapping of generic types in inheritence hierarchy
> --------------------------------------------------------
>                 Key: JOHNZON-59
>                 URL:
>             Project: Johnzon
>          Issue Type: Bug
>          Components: Mapper
>    Affects Versions: 0.9.2-incubating
>            Reporter: Reinhard Sandtner
>            Priority: Critical
>         Attachments: JOHNZON-59.patch
> We heavily use json for saving arbitrary objects as json-string in database.
> if you have a inheritance hierarchy of more than 1 with a generic declaration, deserializing
the string fails with
> * ClassCastException - {{Cannot cast sun.reflect.generics.reflectiveObjects.TypeVariableImpl
to java.lang.Class}} if the JavaType f.e. java.util.Long was serialized as a JsonString
> * MapperException: {{Unable to parse 478965 to T}} if the JavaType was serialized as
> maybe this is a follow up error from [JOHNZON-56|]
but since this got release I decided to create a new issue.

This message was sent by Atlassian JIRA

View raw message