From 45852c07dae33ed430a9b92be9b06ec675f68322 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Fri, 10 May 2019 11:30:42 +0200 Subject: Refactor: Eliminate Non-Compliant HashMap Initialization --- .../java/at/gv/egiz/moazs/config/MarshallerConfig.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/gv/egiz/moazs/config/MarshallerConfig.java b/src/main/java/at/gv/egiz/moazs/config/MarshallerConfig.java index 62e2f83..bde33c1 100644 --- a/src/main/java/at/gv/egiz/moazs/config/MarshallerConfig.java +++ b/src/main/java/at/gv/egiz/moazs/config/MarshallerConfig.java @@ -31,10 +31,10 @@ public class MarshallerConfig { at.gv.zustellung.app2mzs.xsd.persondata.ObjectFactory.class, at.gv.zustellung.msg.xsd.ObjectFactory.class); - marshaller.setMarshallerProperties(new HashMap() {{ - put(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, true); - put("com.sun.xml.bind.namespacePrefixMapper", mzsMapper()); - }}); + var map = new HashMap(); + map.put(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, true); + map.put("com.sun.xml.bind.namespacePrefixMapper", mzsMapper()); + marshaller.setMarshallerProperties(map); return marshaller; } @@ -47,10 +47,10 @@ public class MarshallerConfig { at.gv.zustellung.msg.xsd.ObjectFactory.class, at.gv.zustellung.msg.xsd.persondata.ObjectFactory.class); - marshaller.setMarshallerProperties(new HashMap() {{ - put(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, true); - put("com.sun.xml.bind.namespacePrefixMapper", msgMapper()); - }}); + var map = new HashMap(); + map.put(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, true); + map.put("com.sun.xml.bind.namespacePrefixMapper", msgMapper()); + marshaller.setMarshallerProperties(map); return marshaller; } -- cgit v1.2.3