Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-354

Jackson2JsonRedisSerializer should allow to customise the JavaType for deserialization via getJavaType()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.1 (Evans SR1)
    • Component/s: None
    • Labels:
      None

      Description

      The Jackson2JsonRedisSerializer has an overridable `getJavaType(Class<?> class)` method, but it does not delegate to this method to determine the `javaType` used by the object mapper when deserializing.

      The fix is simple. Instead of setting the private field `JavaType javaType` to the `Class<T> type` passed in from the constructor, it should be set to the type returned by `getJavaType(Class<?> class)`.

        Attachments

          Activity

            People

            Assignee:
            thomasd Thomas Darimont
            Reporter:
            blbrodie Benjamin Brodie
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: