Polishing

This commit is contained in:
Arjen Poutsma
2021-11-23 10:59:28 +01:00
parent 38062c3373
commit a7789db067

View File

@@ -696,8 +696,8 @@ public class XStreamMarshaller extends AbstractMarshaller implements BeanClassLo
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
try {
StaxWriter writer;
if (this.streamDriver instanceof StaxDriver) {
writer = ((StaxDriver) this.streamDriver).createStaxWriter(streamWriter);
if (this.streamDriver instanceof StaxDriver staxDriver) {
writer = staxDriver.createStaxWriter(streamWriter);
}
else {
writer = new StaxWriter(new QNameMap(), streamWriter, this.nameCoder);