From: Roland Häder Date: Sun, 22 Jan 2023 03:37:36 +0000 (+0100) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0f14e594b3119aab7b839b09c80256830cac1331;p=pizzaservice-war.git Please cherry-pick: - fixed some issues reported by Netbeans' inspector, like Foo.parseFoo() versus Foo.valueOf() --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java index f520b329..a569e8eb 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java @@ -57,7 +57,7 @@ public class PizzaFeatureWebApplicationBean extends BasePizzaBean implements Piz final String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N // Default is not enabled - final boolean isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE); + final boolean isEnabled = Boolean.parseBoolean(contextParameter); // Return status return isEnabled; diff --git a/src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java b/src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java index abcc9bdc..2b275aaa 100644 --- a/src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java +++ b/src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java @@ -78,7 +78,7 @@ public class PizzaCountryConverter implements Converter { // Try this better try { // Convert it to long - final Long countryId = Long.parseLong(submittedValue); + final Long countryId = Long.valueOf(submittedValue); // Category id should not be below 1 assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/converter/mobileprovider/PizzaMobileProviderConverter.java b/src/java/org/mxchange/pizzaapplication/converter/mobileprovider/PizzaMobileProviderConverter.java index 6c5bccaf..11c84562 100644 --- a/src/java/org/mxchange/pizzaapplication/converter/mobileprovider/PizzaMobileProviderConverter.java +++ b/src/java/org/mxchange/pizzaapplication/converter/mobileprovider/PizzaMobileProviderConverter.java @@ -77,7 +77,7 @@ public class PizzaMobileProviderConverter implements Converter { // Try this better try { // Convert it to long - final Long providerId = Long.parseLong(submittedValue); + final Long providerId = Long.valueOf(submittedValue); // Category id should not be below 1 assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N diff --git a/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java b/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java index d45804e0..d2cb1afc 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java @@ -86,7 +86,7 @@ public class PizzaCompanyNameValidator extends BaseStringValidator { } // Securely cast it - checkExisting = Boolean.parseBoolean((String) attribute); + checkExisting = Boolean.valueOf((String) attribute); } // Check if name is already used diff --git a/src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java b/src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java index 65c4c1d1..331d81bd 100644 --- a/src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java +++ b/src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java @@ -53,7 +53,7 @@ public class PizzaAbroadDialValidator extends BaseNumberValidator { // No, then try to ... try { // ..parse as number - final Long number = Long.parseLong(dialNumber); + final Long number = Long.valueOf(dialNumber); // Not valid range? (1 - 99, very rude) if (number < 1 || number > 99) {