From c49b56916c14ac493440522767d49d04e49fb677 Mon Sep 17 00:00:00 2001 From: Nightblade73 Date: Sun, 7 Apr 2019 10:08:13 +0400 Subject: [PATCH] #55 added initialization of fields in ConferenceDto --- .../ulstu/conference/model/ConferenceDto.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/ru/ulstu/conference/model/ConferenceDto.java b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java index a9414c1..277e783 100644 --- a/src/main/java/ru/ulstu/conference/model/ConferenceDto.java +++ b/src/main/java/ru/ulstu/conference/model/ConferenceDto.java @@ -13,6 +13,7 @@ import javax.persistence.TemporalType; import javax.validation.constraints.Size; import java.util.ArrayList; import java.util.Date; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -25,22 +26,22 @@ public class ConferenceDto { @Size(min = 2, max = 400) private String title; @Size(max = 500) - private String description; + private String description = ""; @Size(max = 255) - private String url; - private int ping; + private String url = ""; + private int ping = 0; @Temporal(TemporalType.TIMESTAMP) @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date beginDate; + private Date beginDate = new Date(); @Temporal(TemporalType.TIMESTAMP) @DateTimeFormat(pattern = "yyyy-MM-dd") - private Date endDate; + private Date endDate = new Date(); @NotEmpty private List deadlines = new ArrayList<>(); - private Set userIds; - private Set paperIds; - private Set papers; - private Set users; + private Set userIds = new HashSet<>(); + private Set paperIds = new HashSet<>(); + private Set papers = new HashSet<>(); + private Set users = new HashSet<>(); private Integer filterUserId; public ConferenceDto() {