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=3e4f79e2be7c8070caab58475e6716a5b0731b83;p=jjobs-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/jjobs/beans/features/JobsFeatureWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java index f4d0abcc..f23d232a 100644 --- a/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java @@ -57,7 +57,7 @@ public class JobsFeatureWebApplicationBean extends BaseJobsBean implements JobsF 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/jjobs/converter/country/JobsCountryConverter.java b/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java index ca0e31e3..2f84ec74 100644 --- a/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java +++ b/src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java @@ -60,7 +60,7 @@ public class JobsCountryConverter 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/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java b/src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java index 5419751e..5764fb80 100644 --- a/src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java +++ b/src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java @@ -60,7 +60,7 @@ public class JobsMobileProviderConverter implements Converter { // 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/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java index a03ddf08..72416876 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java @@ -77,7 +77,7 @@ public class JobsBasicDataCompanyNameValidator 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/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java index 4c5eae52..2a288e14 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java @@ -71,7 +71,7 @@ public class JobsBasicDataCompanyShortNameValidator extends BaseStringValidator } // Securely cast it - checkExisting = Boolean.parseBoolean((String) attribute); + checkExisting = Boolean.valueOf((String) attribute); } // Is the instance there? diff --git a/src/java/org/mxchange/jjobs/validator/business/basicdata/roadnumber/JobsBasicDataCompanyRoadNumberValidator.java b/src/java/org/mxchange/jjobs/validator/business/basicdata/roadnumber/JobsBasicDataCompanyRoadNumberValidator.java index 14d64bba..bb194633 100644 --- a/src/java/org/mxchange/jjobs/validator/business/basicdata/roadnumber/JobsBasicDataCompanyRoadNumberValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/basicdata/roadnumber/JobsBasicDataCompanyRoadNumberValidator.java @@ -77,7 +77,7 @@ public class JobsBasicDataCompanyRoadNumberValidator 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/jjobs/validator/business/headquarter/JobsHeadquarterCompanyNameValidator.java b/src/java/org/mxchange/jjobs/validator/business/headquarter/JobsHeadquarterCompanyNameValidator.java index c4828b3c..a3637282 100644 --- a/src/java/org/mxchange/jjobs/validator/business/headquarter/JobsHeadquarterCompanyNameValidator.java +++ b/src/java/org/mxchange/jjobs/validator/business/headquarter/JobsHeadquarterCompanyNameValidator.java @@ -71,7 +71,7 @@ public class JobsHeadquarterCompanyNameValidator extends BaseStringValidator { } // Securely cast it - checkExisting = Boolean.parseBoolean((String) attribute); + checkExisting = Boolean.valueOf((String) attribute); } // Is the instance there? diff --git a/src/java/org/mxchange/jjobs/validator/phone/abroad/JobsAbroadDialValidator.java b/src/java/org/mxchange/jjobs/validator/phone/abroad/JobsAbroadDialValidator.java index 170c729d..5d68c0eb 100644 --- a/src/java/org/mxchange/jjobs/validator/phone/abroad/JobsAbroadDialValidator.java +++ b/src/java/org/mxchange/jjobs/validator/phone/abroad/JobsAbroadDialValidator.java @@ -53,7 +53,7 @@ public class JobsAbroadDialValidator 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) {