Repository navigation
Commit 169a8a8
authored
`openidm-script` and `openidm-maintenance` use `javax.xml.bind` without
declaring JAXB: `ScriptRegistryService` names inline scripts with
`DatatypeConverter.printHexBinary`, and `ChecksumFile` formats checksums
with `HexBinaryAdapter.marshal`. JAXB reaches them only through commons
`json-resource` → `api-descriptor`, which
OpenIdentityPlatform/commons#362 removes JAXB from.
Both calls now use `HexFormat.of().withUpperCase()`. The output keeps
the upper case of the JAXB methods, so inline script names and the
update checksums (including the `checksum` field of the update archive
listing) do not change. These were the only uses of `javax.xml.bind` in
the repository.
## Tests
- `ChecksumFileTest.testGetCurrentDigestIsUpperCaseHex` (new) and
`ScriptRegistryServiceTest.testInlineScriptNameIsSha256OfSourceAndType`
compare against literals computed with `md5` and `shasum`. The script
test used to compute its expected value with `HexFormat` itself, which
after this change would only compare the code with itself. Both tests
pass on the base code, and both fail if `withUpperCase()` is dropped.
- With commons#362 simulated (managed exclusions of `jaxb-api`,
`jaxb-core` and `jaxb-impl` on `api-descriptor` and `json-web-token`),
the base fails to compile with `package javax.xml.bind does not exist`
(`ScriptRegistryService.java:39`) and `package
javax.xml.bind.annotation.adapters does not exist`
(`ChecksumFile.java:32`). With this change both modules build and pass
their tests (16 and 117) with and without the simulation.
- The generated `Import-Package` of both bundles differs from the base
only by the removed `javax.xml.bind;version="[2.3,3)"` and
`javax.xml.bind.annotation.adapters;version="[2.3,3)"`.
Fixes #261
1 parent 104e8f6 commit 169a8a8
4 files changed
Lines changed: 16 additions & 11 deletions
File tree
- openidm-maintenance/src
- main/java/org/forgerock/openidm/maintenance/upgrade
- test/java/org/forgerock/openidm/maintenance/upgrade
- openidm-script/src
- main/java/org/forgerock/openidm/script/impl
- test/java/org/forgerock/openidm/script/impl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
| |||
0 commit comments