spdx / spdx/Spdx-Java-Library

SPDX 2.3: LicenseRefs should not be case insensitive

Open
#393 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Java
Stars
71
Forks
44
Avg merge
12h 54m
Merged PRs (30d)
7

Description

According to the spec license expressions case sensitivity section, SPDX license IDs should be treated as case insensitive while LicenseRef's should be considered case sensitive.

Currently, if 2 license refs are found that differ only in case, an error is generated.

This situation should be allowed.

For example:

{
      "licenseId": "LicenseRef-BSD-3-clause-GENERIC",
      "extractedText": "NOASSERTION",
      "name": "BSD-3-clause-GENERIC"
    },
[...]
    {
      "licenseId": "LicenseRef-BSD-3-clause-generic",
      "extractedText": "NOASSERTION",
      "name": "BSD-3-clause-generic"
    },

should be allowed.

The error generated is Analysis exception processing SPDX file: Object URI ...#LicenseRef-BSD-3-clause-generic already exists.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. Start by locating the code that reports duplicate Object URIs for LicenseRefs and the existing analysis tests; reproduce the case with two refs differing only by case, then confirm both are accepted while SPDX license IDs retain case-insensitive handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.