You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some special chars will generate XML data that can not be read afterwards.
I would expect the JAXB.marshal call to fail if this is a expected behaviour, rather than generating unparsable data.
ByteArrayOutputStream out = new ByteArrayOutputStream();
JAXB.marshal("\u0002", out);
JAXB.unmarshal(new ByteArrayInputStream(out.toByteArray()), String.class);
Stacktrace:
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[751712,65]
Message: Ungültiges XML-Zeichen (Unicode: 0x2) wurde im Elementcontent des Dokuments gefunden.
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamFilterImpl.findNextEvent(XMLStreamFilterImpl.java:152)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamFilterImpl.next(XMLStreamFilterImpl.java:102)
at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:165)
at org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:376)
... 9 more
Some special chars will generate XML data that can not be read afterwards.
I would expect the
JAXB.marshal
call to fail if this is a expected behaviour, rather than generating unparsable data.Stacktrace:
Version info:
The text was updated successfully, but these errors were encountered: