XStream
  1. XStream
  2. XSTR-416

@XStreamOmitField isn't omitting a field

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Annotations
    • Labels:
      None
    • JDK version and platform:
      sun 1.6.0_02 for Windows

      Description

      This doesn't work; the poolFactory is still showing up in the output:

      @XStreamOmitField
      private final Factory poolFactory = new Factory() {
      public Object create()

      { return (""); }

      };

      Adding omitField to the code makes it go away:

      public void setUp() throws Exception {
      xstream = new XStream();

      xstream.setMode(XStream.ID_REFERENCES);

      xstream.registerConverter(new CollectionConverter(xstream.getMapper()) {
      @Override
      public boolean canConvert(final Class type)

      { return type == org.apache.commons.collections.list.LazyList.class; }

      });

      xstream.omitField(Photo.class, "poolFactory");
      }

        People

        • Assignee:
          Unassigned
          Reporter:
          Rusty Wright
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: