diff --git a/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/validators/ValidatedEmailValidator.java b/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/validators/ValidatedEmailValidator.java index a00ce159..8c9d2dea 100644 --- a/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/validators/ValidatedEmailValidator.java +++ b/perun-wui-registrar/src/main/java/cz/metacentrum/perun/wui/registrar/widgets/items/validators/ValidatedEmailValidator.java @@ -44,7 +44,10 @@ public boolean validateLocal(ValidatedEmail mail) { // check which mails can be really trusted ArrayList validMails = new ArrayList<>(); List prefilledMails = new ArrayList<>(); - prefilledMails.addAll(Arrays.asList(mail.getItemData().getPrefilledValue().split(";"))); + + if (mail.getItemData().getPrefilledValue() != null) { + prefilledMails.addAll(Arrays.asList(mail.getItemData().getPrefilledValue().split(";"))); + } // we do this, since we can't tell, if mail was pre-filled from federation or perun // by removing all fed values we can be sure, that value from perun will remain as trusted