Commit fd98d59
committed
fix: don't allow qualifiers to contain nullable values
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`.1 parent 86bebd8 commit fd98d59
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 101 | + | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
| |||
124 | 121 | | |
125 | 122 | | |
126 | 123 | | |
127 | | - | |
| 124 | + | |
128 | 125 | | |
129 | 126 | | |
130 | 127 | | |
| |||
0 commit comments