Uploaded image for project: 'Johnzon'
  1. Johnzon
  2. JOHNZON-59

broken mapping of generic types in inheritence hierarchy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.9.2-incubating
    • 0.9.3-incubating
    • Mapper
    • None

    Description

      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 JsonNumber

      maybe this is a follow up error from JOHNZON-56 but since this got release I decided to create a new issue.

      Attachments

        1. JOHNZON-59.patch
          16 kB
          Reinhard Sandtner

        Activity

          People

            struberg Mark Struberg
            rsandtner Reinhard Sandtner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: