XStream
  1. XStream
  2. XSTR-601

Local converters ignored by JavaBeanConverter

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: Converters
    • Labels:
      None

      Description

      ReflectionConverter honors local converters added with XStream.registerLocalConverter() as expected. JavaBeanConverter, however, seems to completely ignore local converters.

      In JavaBeanConverter.marshall() the line:
      context.convertAnother(newObj);
      needs to be replace with:
      context.convertAnother(newObj, mapper.getLocalConverter(definedIn, propertyName));

      The opposite mapping needs to occur in unmarshall.

      Note that I could not fix this by overriding JavaBeanConverter.marshall() due to it using the BeanProvider.Visitor() interface, which is not publicly accessible.

        Issue Links

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            John Currier
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated: