From: Roland Häder Date: Fri, 21 Oct 2022 11:38:08 +0000 (+0200) Subject: Please cherrry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c88dc89b0b5d6c1fa8380e628a7f36cddd6bc59a;p=pizzaservice-war.git Please cherrry-pick: - this is not an argument/parameter of a method. it might have happened due to a logic error, therefore it is an unexpected state --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java index b5f5382c..efe9ab64 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java @@ -444,13 +444,13 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaBean implements Pi throw new NullPointerException("phone.phoneAreaCode is null"); //NOI18N } else if (landLine.getPhoneAreaCode() < 1) { // Abort here - throw new IllegalArgumentException("phone.phoneAreaCode is zero or below."); //NOI18N + throw new IllegalStateException("phone.phoneAreaCode is zero or below."); //NOI18N } else if (landLine.getPhoneNumber() == null) { // Is null throw new NullPointerException("phone.phoneNumber is null"); //NOI18N } else if (landLine.getPhoneNumber() < 1) { // Abort here - throw new IllegalArgumentException("phone.phoneNumber is zero or below."); //NOI18N + throw new IllegalStateException("phone.phoneNumber is zero or below."); //NOI18N } // Set phone number @@ -465,13 +465,13 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaBean implements Pi throw new NullPointerException("fax.phoneAreaCode is null"); //NOI18N } else if (fax.getPhoneAreaCode() < 1) { // Abort here - throw new IllegalArgumentException("fax.phoneAreaCode is zero or below."); //NOI18N + throw new IllegalStateException("fax.phoneAreaCode is zero or below."); //NOI18N } else if (fax.getPhoneNumber() == null) { // Is null throw new NullPointerException("fax.phoneNumber is null"); //NOI18N } else if (fax.getPhoneNumber() < 1) { // Abort here - throw new IllegalArgumentException("fax.phoneNumber is zero or below."); //NOI18N + throw new IllegalStateException("fax.phoneNumber is zero or below."); //NOI18N } // Set fax number @@ -486,7 +486,7 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaBean implements Pi throw new NullPointerException("cmobile.phoneNumber is null"); //NOI18N } else if (mobile.getPhoneNumber() < 1) { // Abort here - throw new IllegalArgumentException("cmobile.phoneNumber is zero or below."); //NOI18N + throw new IllegalStateException("cmobile.phoneNumber is zero or below."); //NOI18N } // Set cmobile number