Skip to content

Commit

Permalink
Fix NPE, "environments" is nullable here
Browse files Browse the repository at this point in the history
  • Loading branch information
mnhock authored Jul 30, 2023
1 parent cb14348 commit 53300e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/enofex/naikan/model/Bom.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 53300e3

Please sign in to comment.