From 53300e3b0fafa0b2776e8843583ce07411666b9b Mon Sep 17 00:00:00 2001 From: Martin Hock Date: Sun, 30 Jul 2023 20:36:18 +0200 Subject: [PATCH] Fix NPE, "environments" is nullable here --- src/main/java/com/enofex/naikan/model/Bom.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/enofex/naikan/model/Bom.java b/src/main/java/com/enofex/naikan/model/Bom.java index 29dadaf..bda7041 100644 --- a/src/main/java/com/enofex/naikan/model/Bom.java +++ b/src/main/java/com/enofex/naikan/model/Bom.java @@ -15,7 +15,7 @@ public record Bom(String id, String bomFormat, String specVersion, LocalDateTime bomFormat = bomFormat != null ? bomFormat : BOM_FORMAT; specVersion = specVersion != null ? specVersion : BomSchema.VERSION_LATEST.version(); timestamp = timestamp != null ? timestamp : LocalDateTime.now(); - environments = environments != null ? environments : environments.empty(); + environments = environments != null ? environments : Environments.empty(); teams = teams != null ? teams : Teams.empty(); developers = developers != null ? developers : Developers.empty(); contacts = contacts != null ? contacts : Contacts.empty();