From 680e49b0fb665b49e1906603863d98ac4ecf35e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 22 Jan 2023 01:44:52 +0100 Subject: [PATCH] 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 --- .../model/email_address/status/EmailChangeStatus.java | 9 --------- 1 file changed, 9 deletions(-) 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; } -- 2.39.5