Support NONE and NOASSERTION in license expressions#307
Support NONE and NOASSERTION in license expressions#307
Conversation
| return new NoAssertionLicense(); | ||
| } else if (SpdxConstantsCompatV2.NONE_VALUE.equals(token)) { | ||
| return new NoneLicense(); | ||
| }else { |
There was a problem hiding this comment.
| }else { | |
| } else { |
| AnyLicenseInfo result = LicenseInfoFactory.parseSPDXLicenseStringCompatV2("MIT AND NOASSERTION AND NONE"); | ||
| assertEquals("(MIT AND NOASSERTION AND NONE)",result.toString()); |
There was a problem hiding this comment.
@pmonks This part of the code targets SPDX 2.x. So it has to be separately resolved.
|
@pmonks @bact - thanks for the review and comments. You're correct in that these are not officially part of the spec. There's a tool out there that's generating these expressions and the library creates a really bad error message. I should probably change the code to just generate a decent error message rather than succeeding - hopefully we can add this to 3.1. |
|
It is possible that the code for 3.0 here (and its expression) will become valid, if eventually at some point NOASSERTION and NONE are added to the SPDX License List (without the need of spec amendment (3.1?)). Alternatively, if it is not preferred to have NOASSERTION and NONE as a license-id in the SPDX License List,
Both (1) and (2) require the spec amendment. |
|
Fixing the error message turned out to be problematic. I'll switch this PR to draft mode awaiting the outcome of the discussion on license expressions. |
No description provided.