Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-242

Nullpointer when using Content.setElement()

XMLWordPrintable

      Using the setElement method of org.jboss.resteasy.plugins.providers.atom.Content causes a NullPointerException to be thrown as its value field is never instanciated.

      How to reproduce:
      Content c = new Content();
      c.setElement(new DOMElement("Test"));

      The value field is however instanciated if the setText() method is used, and since the value field (a list) is cleared when the setElement method is used this can be used as a workaround.
      Workaround:
      Content c = new Content();
      c.setText("");
      c.setElement(new DOMElement("Test"));

            patriot1burke@gmail.com Bill Burke (Inactive)
            sjurba_jira Sjur Bakka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: