From: Roland Häder Date: Sun, 22 Jan 2023 00:44:52 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=680e49b0fb665b49e1906603863d98ac4ecf35e8;p=juser-core.git Continued: - constructors of enumerations cannot be unit-tested with null references, also they are private by definition and those methods and constructors are really hard to test. Still making all methods and constructors public only for being unit-tested isn't right, too --- diff --git a/src/org/mxchange/jusercore/model/email_address/status/EmailChangeStatus.java b/src/org/mxchange/jusercore/model/email_address/status/EmailChangeStatus.java index 8ab11f5..ebe7446 100644 --- a/src/org/mxchange/jusercore/model/email_address/status/EmailChangeStatus.java +++ b/src/org/mxchange/jusercore/model/email_address/status/EmailChangeStatus.java @@ -57,15 +57,6 @@ public enum EmailChangeStatus implements Serializable { * @param messageKey Message key (i18n) */ private EmailChangeStatus (final String messageKey) { - // Validate parameter - if (null == messageKey) { - // Throw NPE - throw new NullPointerException("messageKey is null"); //NOI18N - } else if (messageKey.isEmpty()) { - // Throw IAE - throw new IllegalArgumentException("messageKey is empty"); //NOI18N - } - // Set it here this.messageKey = messageKey; }