From 70e8a1b80fea9d61c46dbd55aa1b461a8bb3a0f7 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Wed, 28 Aug 2019 13:34:41 +0200 Subject: Fixes and Refactoring - JAXB Hack: Handle InterruptionException properly (as in [1], "Dont swallow Interrupts") - Mzs2MsgConverter: Rename convert(Person) to convertReceiverPerson(Person) to emphasize that this method can only be used to convert Receiver Persons (Reminder: Receiver Persons are PhysicalPersons / CorporateBodies. SenderPersons can also be Authorities) - Mzs2MsgConverter: Remove assertion because not needed anymore. - Refactor: Move mzs:DeliveryRequest validation out ouf augmenter and into service. - Refactor: Create a single entry point for validating a mzs:DeliveryRequest. - Remove unused imports. - Fix log messages. [1] https://www.ibm.com/developerworks/java/library/j-jtp05236/index.html?ca=drs-#2.1 --- src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/at/gv/egiz/moazs/util') diff --git a/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java b/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java index 9e72286..c91860b 100644 --- a/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java +++ b/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java @@ -13,6 +13,8 @@ public class JAXBClassNotFoundFix { private static final Logger log = LoggerFactory.getLogger(JAXBClassNotFoundFix.class); + private JAXBClassNotFoundFix() {} + /** * Solves JAXB's "ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory" in Java >= 9 * by running func in a dedicated thread which has its context classloader replaced with a classloader that finds @@ -44,6 +46,7 @@ public class JAXBClassNotFoundFix { t.join(); } catch (InterruptedException ex) { log.error("Interrupted. ", ex); + throw moaZSException("Interrupted. ", ex); } if (error[0] != null) { -- cgit v1.2.3