packageurl-java icon indicating copy to clipboard operation
packageurl-java copied to clipboard

fix: don't allow qualifiers to contain nullable values

Open dwalluck opened this issue 10 months ago • 2 comments

This fixes the warning "Assigning a collection of nullable elements into a collection of non-null elements" which was a difference between what PurlParameters::getQualifiers returns and what PackageURL::new expects. So far, we don't have an example of qualifiers with null elements, but we can just return "null" instead which should have the same effect when comparing values.

Simplify the creation of the qualifiers map from the JSONObject by using Collectors::toMap.

dwalluck avatar Apr 02 '25 15:04 dwalluck