[YANGTOOLS-906] Fix JDK11/javax.xml.bind.DatatypeConverter mismatch Created: 24/Sep/18 Updated: 09/Oct/18 Resolved: 09/Oct/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | data-impl |
| Affects Version/s: | None |
| Fix Version/s: | 2.0.12, 2.1.2 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | java9 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We use DatatypeConverter for BASE64 decoding, which is not optimal, as we are depending on JAXB for a very simple piece of functionality. Create a dedicated codec class, so that we free up the dependency – allowing us to run without that particular Java module. |
| Comments |
| Comment by Robert Varga [ 24/Sep/18 ] |
|
We should also expose this utility for downstreams, as there are quite a few downstreams who are doing exactly the same. |
| Comment by Robert Varga [ 24/Sep/18 ] |
|
Actually, we can just not embed it and rely the promise that the package will be available – jaxb-java-2.2.1 iis promised, which is better than nothing. Hence add a provided dependency (and patch it upstream) to version 2.2.1, which matches what Karaf promises (and is lower than whan jre-8/9/10 transition table promises). |
| Comment by Robert Varga [ 24/Sep/18 ] |
|
Fluorine backport is fair, as JDK9+JAXB API should be fair game. It weighs ~120kB and there are others using it (netconf, etc.). |
| Comment by Robert Varga [ 09/Oct/18 ] |
|
This needs another fix to work correctly with downstreams. |