-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix support for CycloneDX 1.5 #362
Conversation
Fix bug causing the CycloneDX 1.5 schema version to be ignored by the plugin with fallback to 1.4. Update docs with spec references to version 1.5. Fixes gh-361 Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
@@ -4,6 +4,8 @@ | |||
|
|||
public class CycloneDxUtils { | |||
|
|||
public static final CycloneDxSchema.Version DEFAULT_SCHEMA_VERSION = CycloneDxSchema.Version.VERSION_15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Centralising the default version here should reduce the likelihood to change the default version in the Task property without also updating this util class, preventing the current bug to happen again.
It's also possible to configure the default directly to CycloneDxSchema.VERSION_LATEST
, but it would be less obvious which version is that just by reading the code, so I opted for a more explicit configuration. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes gh-361 Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
It looks like I missed a couple of tests to update to check against the default version rather than hard-coded 1.4. I'm about to push the missing change. |
Thanks @ThomasVitale! |
Fix bug causing the CycloneDX 1.5 schema version
to be ignored by the plugin with fallback to 1.4.
Update docs with spec references to version 1.5.
Fixes gh-361