Andreas Veithen created AXIOM-519:
-------------------------------------
Summary: NullPointerException after using setOptimize(true) on a
plain OMText node
Key: AXIOM-519
URL: https://issues.apache.org/jira/browse/AXIOM-519
Project: Axiom
Issue Type: Bug
Components: LLOM
Affects Versions: 1.3.0
Reporter: Andreas Veithen
Assignee: Andreas Veithen
Fix For: 2.0.0
The following code works in 1.2.22, but throws a {{NullPointerException}} in
1.3.0 and later versions:
{code:java}
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);
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]