spdx / spdx-java-tagvalue-store

SPDX Document Storage using the Tag/Value format
Apache License 2.0
2 stars 1 forks source link

Parsing PrimaryPackagePurpose of OPERATING-SYSTEM fails #61

Open medcrypt-matt opened 3 months ago

medcrypt-matt commented 3 months ago

If a SPDX 2.3 tag/value file contains PrimaryPackagePurpose: OPERATING-SYSTEM then attempts to convert the file, or to deserialize it using SpdxToolsHelper.deserializeDocument will fail with org.spdx.tag.InvalidSpdxTagFileException: Unknown Package Purpose: OPERATING-SYSTEM

This value is perfectly valid according to the spec: https://spdx.github.io/spdx-spec/v2.3/package-information/#724-primary-package-purpose-field

The problem seems to be that the enum member is named OPERATING_SYSTEM (note the underscore)

goneall commented 3 months ago

Thanks @medcrypt-matt for reporting this. This should be a straightforward fix, but it may be a while before I get to it myself. If you want to create a PR, I can review / merge otherwise I'll take a look once I finish the 3.0 upgrades to the library.