Removes use of JAXB API via jackson-dataformat-xml#29384
Conversation
a9c5fdd to
b81d060
Compare
b81d060 to
5b63b51
Compare
5b63b51 to
97edd1c
Compare
| public final class JDBCRepositorySQL { | ||
|
|
||
| @XmlAttribute(required = true) | ||
| @JacksonXmlProperty(isAttribute = true) |
There was a problem hiding this comment.
We lost required here? Is there no such property with JacksonXmlProperty?
There was a problem hiding this comment.
- There is no direct equivalent.
Unfortunately XML is special: due to structure being what it is, empty Element looks either as "Object with no properties" or "empty String".
- In Required attribute of
@JsonPropertyis ignored when deserializing from XML FasterXML/jackson-dataformat-xml#538, the Jackson maintainer has a different opinion onrequiredthan the JAXB API. Should I use@JsonPropertyto markrequiredand then set it as follows?
final XmlMapper xmlMapper = new XmlMapper();
xmlMapper.configure(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES, true);There was a problem hiding this comment.
-
I'm not sure how the JAXB API handles the
requiredattribute. -
In my local unit test,
jaxb-runtimedoes not throw an exception for empty elements, but gets null values normally likejackson-dataformat-xml.requiredseems to be just for IDE censorship.
There was a problem hiding this comment.
OK, I see. It could be better to open an issue since we need more investigation.
There was a problem hiding this comment.
OK, I see. It could be better to open an issue since we need more investigation.
For #26041.
Changes proposed in this pull request:
shardingsphere-transaction-xa-narayanadoes not require JAXB at all.org.glassfish.jaxb:jaxb-runtime:2.3.1which is no longer needed. Passed the test of./mvnw -PnativeTestInShardingSphere -T1C -e clean test. For Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests #29052 .com.fasterxml.jackson.datatype:jackson-datatype-jdk8to adapt to Jackson 2.16.0. Otherwise an error is thrown.Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.