]> git.mxchange.org Git - juser-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 22 Jan 2023 00:44:52 +0000 (01:44 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Jan 2023 00:44:52 +0000 (01:44 +0100)
- 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

src/org/mxchange/jusercore/model/email_address/status/EmailChangeStatus.java

index 8ab11f529aaace4ebf7dcce0f517fc66a5b001a9..ebe7446a1caaf028057bec9332b6b004b3b75dc4 100644 (file)
@@ -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;
        }