Skip to content

Tolerate UTF8 byte order marker in file parsing#885

Merged
nscuro merged 1 commit into
CycloneDX:masterfrom
nscuro:tolerate-byte-order-mark
Jul 16, 2026
Merged

Tolerate UTF8 byte order marker in file parsing#885
nscuro merged 1 commit into
CycloneDX:masterfrom
nscuro:tolerate-byte-order-mark

Conversation

@nscuro

@nscuro nscuro commented Jul 16, 2026

Copy link
Copy Markdown
Member

Expands on #831 by:

  • Handling byte-order marks in not only BomParserFactory#createParser(File) but also #createParser(byte[]) and #looksLikeCycloneDX(byte[]).
  • Using minimal test BOMs instead of full duplicates of bom-1.2.(json|xml).

Expands on CycloneDX#831 by:

* Handling byte-order marks in not only `BomParserFactory#createParser(File)` but also `#createParser(byte[])` and `#looksLikeCycloneDX(byte[])`.
* Using minimal test BOMs instead of full duplicates of `bom-1.2.(json|xml)`.

Co-authored-by: Michael Kuerbis <michael_kuerbis@web.de>
Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro requested a review from a team as a code owner July 16, 2026 15:49
@nscuro nscuro added the enhancement New feature or request label Jul 16, 2026
@codacy-production

codacy-production Bot commented Jul 16, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 6 complexity

Metric Results
Complexity 6

View in Codacy

🟢 Coverage 85.71% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation +0.01% coverage variation
Diff coverage 85.71% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (52e52bb) 7675 5731 74.67%
Head commit (3d58a1a) 7682 (+7) 5737 (+6) 74.68% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#885) 14 12 85.71%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@nscuro nscuro merged commit 9a772a2 into CycloneDX:master Jul 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant