Skip to content

Commit

Permalink
Merge pull request #18 from lorthirk/fix-licenseStatusEmptyNpe
Browse files Browse the repository at this point in the history
Treat empty licences as restricted
  • Loading branch information
waynebeaton committed Jul 21, 2020
2 parents d5f2f51 + dc0b02c commit 3995528
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private static Map<String, String> getApprovedLicenses(Reader contentReader) {
* <code>Status.Restricted</code> otherwise
*/
public Status getStatus(String expression) {
if (expression == null)
if (expression == null || expression.trim().isEmpty())
return Status.Restricted;

if (new SpdxExpressionParser().parse(expression).matchesApproved(approvedLicenses.keySet())) {
Expand Down

0 comments on commit 3995528

Please sign in to comment.