From 09d7c7533535ca4dd4b7152dff8e84144862190b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 3 Nov 2022 21:52:24 +0100 Subject: [PATCH] Continued: - renamed TitleUtils to PersonalTitleUtils - removed null-check as enumerations won't have this --- .../mxchange/jcontacts/model/contact/gender/Gender.java | 9 --------- .../jcontacts/model/contact/title/PersonalTitle.java | 9 --------- .../title/{TitleUtils.java => PersonalTitleUtils.java} | 4 ++-- 3 files changed, 2 insertions(+), 20 deletions(-) rename src/org/mxchange/jcontacts/model/contact/title/{TitleUtils.java => PersonalTitleUtils.java} (96%) diff --git a/src/org/mxchange/jcontacts/model/contact/gender/Gender.java b/src/org/mxchange/jcontacts/model/contact/gender/Gender.java index ff5041a..72a1b17 100644 --- a/src/org/mxchange/jcontacts/model/contact/gender/Gender.java +++ b/src/org/mxchange/jcontacts/model/contact/gender/Gender.java @@ -53,15 +53,6 @@ public enum Gender implements Serializable { * @param messageKey Message key for resource file */ private Gender (final char accessChar, 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 both this.accessChar = accessChar; this.messageKey = messageKey; diff --git a/src/org/mxchange/jcontacts/model/contact/title/PersonalTitle.java b/src/org/mxchange/jcontacts/model/contact/title/PersonalTitle.java index b74f571..4de2adf 100644 --- a/src/org/mxchange/jcontacts/model/contact/title/PersonalTitle.java +++ b/src/org/mxchange/jcontacts/model/contact/title/PersonalTitle.java @@ -53,15 +53,6 @@ public enum PersonalTitle implements Serializable { * @param messageKey Message key for resource file */ private PersonalTitle (final char accessChar, 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 both this.accessChar = accessChar; this.messageKey = messageKey; diff --git a/src/org/mxchange/jcontacts/model/contact/title/TitleUtils.java b/src/org/mxchange/jcontacts/model/contact/title/PersonalTitleUtils.java similarity index 96% rename from src/org/mxchange/jcontacts/model/contact/title/TitleUtils.java rename to src/org/mxchange/jcontacts/model/contact/title/PersonalTitleUtils.java index 0d100d7..419fb2a 100644 --- a/src/org/mxchange/jcontacts/model/contact/title/TitleUtils.java +++ b/src/org/mxchange/jcontacts/model/contact/title/PersonalTitleUtils.java @@ -26,7 +26,7 @@ import java.util.List; *

* @author Roland Häder */ -public class TitleUtils implements Serializable { +public class PersonalTitleUtils implements Serializable { /** * Serial number @@ -105,7 +105,7 @@ public class TitleUtils implements Serializable { /** * Private constructor as this is an utility class */ - private TitleUtils () { + private PersonalTitleUtils () { } } -- 2.39.5