diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2024-10-28 12:56:36 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-29 20:02:49 +0000 |
commit | 122be7bb5860e7d4d643fbce2e5d5b153da8714c (patch) | |
tree | 5bdee4e1f4cfeb2bd0516e8d398c11aedf91f7ed /server/sonar-db-dao/src | |
parent | 62721916c9f1e0b2ca9a6fa3a3fbc3907834f531 (diff) | |
download | sonarqube-122be7bb5860e7d4d643fbce2e5d5b153da8714c.tar.gz sonarqube-122be7bb5860e7d4d643fbce2e5d5b153da8714c.zip |
SONAR-23485 Fix NPE when importing FOSSA CVEs
Make published_at and last_modified_at nullable
Diffstat (limited to 'server/sonar-db-dao/src')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java | 13 | ||||
-rw-r--r-- | server/sonar-db-dao/src/schema/schema-sq.ddl | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java index 53278c024c4..e8c3cd8a21e 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/dependency/CveDto.java @@ -19,14 +19,21 @@ */ package org.sonar.db.dependency; +import javax.annotation.Nullable; + public record CveDto( String uuid, String id, String description, - double cvssScore, - double epssScore, - double epssPercentile, + @Nullable + Double cvssScore, + @Nullable + Double epssScore, + @Nullable + Double epssPercentile, + @Nullable Long publishedAt, + @Nullable Long lastModifiedAt, Long createdAt, Long updatedAt diff --git a/server/sonar-db-dao/src/schema/schema-sq.ddl b/server/sonar-db-dao/src/schema/schema-sq.ddl index 8d87b6f6d02..272b1c156a1 100644 --- a/server/sonar-db-dao/src/schema/schema-sq.ddl +++ b/server/sonar-db-dao/src/schema/schema-sq.ddl @@ -263,8 +263,8 @@ CREATE TABLE "CVES"( "CVSS_SCORE" DOUBLE PRECISION, "EPSS_SCORE" DOUBLE PRECISION, "EPSS_PERCENTILE" DOUBLE PRECISION, - "PUBLISHED_AT" BIGINT NOT NULL, - "LAST_MODIFIED_AT" BIGINT NOT NULL, + "PUBLISHED_AT" BIGINT, + "LAST_MODIFIED_AT" BIGINT, "CREATED_AT" BIGINT NOT NULL, "UPDATED_AT" BIGINT NOT NULL ); |