-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Augmenting an existing XML Bom Tools causes java.lang.UnsupportedOperationException #571
Comments
Can you please share the SBOM you are using to test? or the one you are getting the issue with? or what part of the code you sent is causing the issue? I am loading SBOM with tools (2) then I add a new one after being deserialized and it allows me to do so |
@mr-zepol apologies I had an error in the above testcase... i've Editted it and corrected it.. Here is the output and files from running it:
Issue571_SBOM.xml :
|
Yeah this scenario works :-) |
PR to fix this issue #574 , you were right a non-modifiable singleton was creating when the deserializer for vulnerabilities was added |
Fixed via #574. @andrew-m-leonard You could give this a spin using the latest |
@nscuro Hi Niklas, i've just tested it, and it now passes all our tests. thank you for fixing this. |
Using release 10.0.0 with the fix for #562 the tools are now being serialized correctly, however if an existing Bom containing a "single" existing Tool is Deserialized and then an attempt to add a new Tool to the Components, we get
The problem only occurs if the existing Bom only has a "single" existing Tool, it seems if the existing Bom has two existing Tools the Deserialization then constructs a List which supports the add() operation.
Test case:
The text was updated successfully, but these errors were encountered: