Skip to content

Commit 99bc7a5

Browse files
danielcorreia96sergiofbsilva
authored andcommitted
NewMessage UI - NPE when no Group Recipient is selected FMSG-36 #resolve
1 parent 432e1ce commit 99bc7a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

messaging-core/src/main/java/org/fenixedu/messaging/core/ui/MessageBean.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import java.util.Date;
3939
import java.util.HashSet;
4040
import java.util.Locale;
41+
import java.util.Optional;
4142
import java.util.Set;
4243
import java.util.stream.Collectors;
4344

@@ -112,7 +113,7 @@ public void setSingleRecipients(final String singleRecipients) {
112113
}
113114

114115
public Set<String> getSelectedRecipients() {
115-
return selectedRecipients;
116+
return Optional.ofNullable(selectedRecipients).orElseGet(HashSet::new);
116117
}
117118

118119
public void setSelectedRecipients(final Set<String> recipients) {

0 commit comments

Comments
 (0)