From 860beb7cce7191a176996a220dccffa32d42da52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 22 Jan 2023 04:37:36 +0100 Subject: [PATCH] Please cherry-pick: - fixed some issues reported by Netbeans' inspector, like Foo.parseFoo() versus Foo.valueOf() --- .../beans/features/AddressbookFeatureWebApplicationBean.java | 2 +- .../converter/country/AddressbookCountryConverter.java | 2 +- .../mobileprovider/AddressbookMobileProviderConverter.java | 2 +- .../basicdata/AddressbookBasicDataCompanyNameValidator.java | 2 +- .../AddressbookBasicDataCompanyShortNameValidator.java | 2 +- .../AddressbookBasicDataCompanyRoadNumberValidator.java | 2 +- .../headquarter/AddressbookHeadquarterCompanyNameValidator.java | 2 +- .../validator/phone/abroad/AddressbookAbroadDialValidator.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java index a0212aa2..d44357c9 100644 --- a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java @@ -57,7 +57,7 @@ public class AddressbookFeatureWebApplicationBean extends BaseAddressbookBean im 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/addressbook/converter/country/AddressbookCountryConverter.java b/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java index 5ddee2aa..7b9b4dcb 100644 --- a/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java +++ b/src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java @@ -60,7 +60,7 @@ public class AddressbookCountryConverter implements Converter { // Try this better try { // Convert it to long - final Long countryId = Long.parseLong(submittedValue); + final Long countryId = Long.valueOf(submittedValue); // Try to find it country = COUNTRY_LIST_CONTROLLER.findCountryById(countryId); diff --git a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java index 3547fe36..caee650f 100644 --- a/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java +++ b/src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java @@ -60,7 +60,7 @@ public class AddressbookMobileProviderConverter implements Converter 99) { -- 2.39.5