Skip to content

Commit d8c3f6a

Browse files
committed
Initialize transient fields with empty HashMap instead of null
1 parent 9686ab8 commit d8c3f6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/edu/harvard/iq/dataverse/authorization/users/AuthenticatedUser.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.io.Serializable;
1919
import java.sql.Timestamp;
2020
import java.util.Date;
21+
import java.util.HashSet;
2122
import java.util.List;
2223
import java.util.Objects;
2324
import java.util.Set;
@@ -135,10 +136,10 @@ public class AuthenticatedUser implements User, Serializable {
135136
private String mutedNotifications;
136137

137138
@Transient
138-
private Set<Type> mutedEmailsSet;
139+
private Set<Type> mutedEmailsSet = new HashSet<>();
139140

140141
@Transient
141-
private Set<Type> mutedNotificationsSet;
142+
private Set<Type> mutedNotificationsSet = new HashSet<>();
142143

143144
@PrePersist
144145
void prePersist() {

0 commit comments

Comments
 (0)