Uploaded image for project: 'Axiom'
  1. Axiom
  2. AXIOM-519

NullPointerException after using setOptimize(true) on a plain OMText node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.3.0
    • 2.0.0
    • LLOM
    • None

    Description

      The following code works in 1.2.22, but throws a NullPointerException in 1.3.0 and later versions:

      OMFactory factory = OMAbstractFactory.getOMFactory();
      OMElement element = factory.createOMElement("root", null);
      OMText text = factory.createOMText(element,
              Base64.getEncoder().encodeToString("foobar".getBytes(StandardCharsets.UTF_8)));
      text.setOptimize(true);
      OMOutputFormat format = new OMOutputFormat();
      format.setDoOptimize(true);
      element.serialize(System.out, format);
      

      Attachments

        Activity

          People

            veithen Andreas Veithen
            veithen Andreas Veithen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: