Added null check to date parsing.
@@ -45,6 +45,7 @@ import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
@@ -289,7 +290,7 @@ public class VulnerabilityStatementsProcessor extends Plugin {
var latestDate = sdf.parse("1950-01-01");
for (Patch patch : v.getPatches()) {
var patchDate = sdf.parse(patch.getPatchDate());
- if (patchDate.after(latestDate)) {
+ if (Objects.nonNull(patchDate) && patchDate.after(latestDate)) {
latestDate = patchDate;
set = true;
}
