mizosoft / methanol

⚗️ Lightweight HTTP extensions for Java
https://mizosoft.github.io/methanol
MIT License
239 stars 12 forks source link

Jaxb Jakarta support #65

Closed MarkusWendorf closed 9 months ago

MarkusWendorf commented 10 months ago

Hey happy holidays,

I tried using the Jaxb Adapter with Java 21 using Jaxb Jakarta (jakarta.xml.bind.annotation) annotated classes but get a UnsupportedOperationException.

I assume the problem is that the Jaxb adapter still uses the Java 8 javax.xml namespace.

Not sure how to handle this properly but I think one could just copy & paste the existing adapter and change the imports and provide it as jaxb-jakarta adapter.

mizosoft commented 9 months ago

Hey @MarkusWendorf, thanks for reporting. Apologies for the late reply.

Good catch. Creating a new adapter seems to be the right thing to do.