public class MiniJAXB extends Object
With jOOQ 3.12, the JAXB dependency has been removed in favour of this home grown solution. Due to the modularisation that happened with JDK 9+ and the removal of JAXB from the JDK 11+, it is unreasonable to leave the burden of properly configuring transitive JAXB dependency to jOOQ users.
Constructor and Description |
---|
MiniJAXB() |
Modifier and Type | Method and Description |
---|---|
static String |
jaxbNamespaceBugWorkaround(String xml,
Object annotated)
This method is used internally by jOOQ to patch XML content in order to
work around a bug in JAXB.
|
public static String jaxbNamespaceBugWorkaround(String xml, Object annotated)
[#7579] [#8044] On JDK 9, 10, depending on how JAXB is loaded onto the classpath / module path, the xmlns seems to be considered for (un)marshalling, or not. This seems to be a bug in JAXB, with no known tracking ID as of yet.
The following quick fix tests the presence of the xmlns when marshalling, and if absent removes it prior to unmarshalling.
Copyright © 2019. All rights reserved.