Skip to content

Commit

Permalink
fix: npe (#6232)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Dec 6, 2023
1 parent 38fd0af commit ccd753d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ private boolean checkUpdate() throws UpdateException {
// ms Valid = valid (hours) x 60 min/hour x 60 sec/min x 1000 ms/sec
final long validForSeconds = validForHours * 60L * 60L;
final ZonedDateTime lastChecked = dbProperties.getTimestamp(DatabaseProperties.NVD_CACHE_LAST_CHECKED);
if (lastChecked == null) {
if (lastChecked != null) {
final ZonedDateTime now = ZonedDateTime.now(ZoneId.of("UTC"));
final Duration duration = Duration.between(lastChecked, now);
final long difference = duration.getSeconds();
Expand Down

0 comments on commit ccd753d

Please sign in to comment.