Repository navigation
Conversation
…stead of JAXB openidm-script and openidm-maintenance used javax.xml.bind (DatatypeConverter.printHexBinary, HexBinaryAdapter.marshal) without declaring JAXB; it came only transitively through commons api-descriptor, which OpenIdentityPlatform/commons#362 drops. Both now use HexFormat.of().withUpperCase(), so inline script names and update checksums keep their upper-case form. The tests pin both outputs with literals computed outside the JVM; the script test previously derived its expected value with HexFormat itself. Fixes OpenIdentityPlatform#261
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
openidm-scriptandopenidm-maintenanceusejavax.xml.bindwithout declaring JAXB:ScriptRegistryServicenames inline scripts withDatatypeConverter.printHexBinary, andChecksumFileformats checksums withHexBinaryAdapter.marshal. JAXB reaches them only through commonsjson-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 thechecksumfield of the update archive listing) do not change. These were the only uses ofjavax.xml.bindin the repository.Tests
ChecksumFileTest.testGetCurrentDigestIsUpperCaseHex(new) andScriptRegistryServiceTest.testInlineScriptNameIsSha256OfSourceAndTypecompare against literals computed withmd5andshasum. The script test used to compute its expected value withHexFormatitself, which after this change would only compare the code with itself. Both tests pass on the base code, and both fail ifwithUpperCase()is dropped.jaxb-api,jaxb-coreandjaxb-implonapi-descriptorandjson-web-token), the base fails to compile withpackage javax.xml.bind does not exist(ScriptRegistryService.java:39) andpackage 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.Import-Packageof both bundles differs from the base only by the removedjavax.xml.bind;version="[2.3,3)"andjavax.xml.bind.annotation.adapters;version="[2.3,3)".Fixes #261