XStream
  1. XStream
  2. XSTR-753

NPE in Serialization if annotation @XStreamAsAttribute is used with a generic

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.6
    • Fix Version/s: 1.4.7
    • Component/s: Core
    • Labels:
      None
    • JDK version and platform:
      SUN 1.6

      Description

      We are using quite heavily xstream, with xstream 1.4.x we are not able to serialize our classes anymore.
      Problem is the @XStreamAsAttribute on a generic. It works with 1.3.1
      Attached are testcases for it. Currently this is a blocker for us for updating xstream to any newer version. Without the annotation and its processing it works.
      for example
      ....
      public class Test1<VALTYPE extends Serializable> implements Serializable
      {

      private static final long serialVersionUID = 1383196364083356677L;
      @XStreamAsAttribute
      private VALTYPE value;
      ......
      results in an NPE in
      com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:161)

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Andreas Zschorn
        • Votes:
          2 Vote for this issue
          Watchers:
          4 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: