@SuppressWarnings("Duplicates") @Nullable @Override public EmailAddress commitValue() throws MIWTException { EmailAddress result = super.commitValue(); if (result != null) { if (!_config.getIncludedFields().contains(EmailAddressField.category)) result.setCategory(_config.getDefaultContactDataCategory()); if (StringFactory.isEmptyString(result.getEmail())) result = null; } return result; }
@SuppressWarnings("Duplicates") @Nullable @Override public EmailAddress getUIValue(Level logErrorLevel) { EmailAddress result = super.getUIValue(logErrorLevel); if (result != null) { if (!_config.getIncludedFields().contains(EmailAddressField.category)) result.setCategory(_config.getDefaultContactDataCategory()); if (StringFactory.isEmptyString(result.getEmail())) result = null; } return result; }