Fix BOM export failing for projects of type NONE#5148
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
Fixes DependencyTrack#4988 Signed-off-by: nscuro <[email protected]>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where BOM export was failing for projects with a classifier of type NONE. The fix ensures that projects with NONE classifier are properly handled during CycloneDX BOM generation.
- Updated component and project type mapping to exclude
NONEclassifier from direct conversion - Changed default project type from
LIBRARYtoAPPLICATIONwhen classifier is null orNONE - Added proper null/NONE classifier checks to prevent conversion failures
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ModelConverter.java | Fixed classifier handling to exclude NONE type and updated default project type mapping |
| BomResourceTest.java | Updated test assertion to reflect new default project type from library to application |
Description
Fixes BOM export failing for projects of type
NONE.Addressed Issue
Fixes #4988
Additional Details
N/A
Checklist
This PR implements an enhancement, and I have provided tests to verify that it works as intendedThis PR introduces changes to the database model, and I have added corresponding update logicThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly