From: Roland Häder <roland@mxchange.org> 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=3cbb193fb2784916cfea8b1957601b2c48515b50;p=jfinancials-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/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java b/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java index 840a314b..42994398 100644 --- a/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java @@ -57,7 +57,7 @@ public class FinancialsFeatureWebApplicationBean extends BaseFinancialsBean impl 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/jfinancials/converter/country/FinancialsCountryConverter.java b/src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java index 92956915..d64c2520 100644 --- a/src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java +++ b/src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java @@ -60,7 +60,7 @@ public class FinancialsCountryConverter implements Converter<Country> { // 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/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java b/src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java index 05221b5d..4614ab98 100644 --- a/src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java +++ b/src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java @@ -60,7 +60,7 @@ public class FinancialsMobileProviderConverter implements Converter<MobileProvid // Try this better try { // Convert it to long - final Long providerId = Long.parseLong(submittedValue); + final Long providerId = Long.valueOf(submittedValue); // Lookup of mobile provider mobileProvider = MOBILE_PROVIDER_LIST_CONTROLLER.findMobileProviderById(providerId); diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java index 939edc3c..51e9d648 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java @@ -77,7 +77,7 @@ public class FinancialsBasicDataCompanyNameValidator 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/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java index c5128ba7..364703e4 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java @@ -71,7 +71,7 @@ public class FinancialsBasicDataCompanyShortNameValidator extends BaseStringVali } // Securely cast it - checkExisting = Boolean.parseBoolean((String) attribute); + checkExisting = Boolean.valueOf((String) attribute); } // Is the instance there? diff --git a/src/java/org/mxchange/jfinancials/validator/business/basicdata/roadnumber/FinancialsBasicDataCompanyRoadNumberValidator.java b/src/java/org/mxchange/jfinancials/validator/business/basicdata/roadnumber/FinancialsBasicDataCompanyRoadNumberValidator.java index 29f21406..04d11170 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/basicdata/roadnumber/FinancialsBasicDataCompanyRoadNumberValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/basicdata/roadnumber/FinancialsBasicDataCompanyRoadNumberValidator.java @@ -77,7 +77,7 @@ public class FinancialsBasicDataCompanyRoadNumberValidator extends BaseStringVal } // 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/jfinancials/validator/business/headquarter/FinancialsHeadquarterCompanyNameValidator.java b/src/java/org/mxchange/jfinancials/validator/business/headquarter/FinancialsHeadquarterCompanyNameValidator.java index 774b26b7..b0ddc5fd 100644 --- a/src/java/org/mxchange/jfinancials/validator/business/headquarter/FinancialsHeadquarterCompanyNameValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/business/headquarter/FinancialsHeadquarterCompanyNameValidator.java @@ -71,7 +71,7 @@ public class FinancialsHeadquarterCompanyNameValidator extends BaseStringValidat } // Securely cast it - checkExisting = Boolean.parseBoolean((String) attribute); + checkExisting = Boolean.valueOf((String) attribute); } // Is the instance there? diff --git a/src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java b/src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java index 410ac7ba..8bce832b 100644 --- a/src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java +++ b/src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java @@ -53,7 +53,7 @@ public class FinancialsAbroadDialValidator extends BaseStringValidator { // 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) {