]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sun, 22 Jan 2023 03:37:36 +0000 (04:37 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Jan 2023 03:38:39 +0000 (04:38 +0100)
- fixed some issues reported by Netbeans' inspector, like Foo.parseFoo() versus
  Foo.valueOf()

src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java
src/java/org/mxchange/jjobs/converter/country/JobsCountryConverter.java
src/java/org/mxchange/jjobs/converter/mobileprovider/JobsMobileProviderConverter.java
src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyNameValidator.java
src/java/org/mxchange/jjobs/validator/business/basicdata/JobsBasicDataCompanyShortNameValidator.java
src/java/org/mxchange/jjobs/validator/business/basicdata/roadnumber/JobsBasicDataCompanyRoadNumberValidator.java
src/java/org/mxchange/jjobs/validator/business/headquarter/JobsHeadquarterCompanyNameValidator.java
src/java/org/mxchange/jjobs/validator/phone/abroad/JobsAbroadDialValidator.java

index f4d0abccb4c893320e86d76e1d0acabc31015918..f23d232ae36c7c0fe0128306a547d57642eeba62 100644 (file)
@@ -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;
index ca0e31e3d336def8409d9df27f24b52d43b54339..2f84ec74f9139934d56a9b9a7902140a19089c43 100644 (file)
@@ -60,7 +60,7 @@ public class JobsCountryConverter 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);
index 5419751e653be908f2cd3c210309817c3b7833e7..5764fb8034cb6f17d73b2adb7125b7d1aa48406e 100644 (file)
@@ -60,7 +60,7 @@ public class JobsMobileProviderConverter implements Converter<MobileProvider> {
                // 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);
index a03ddf0826b385252a1acce3a5b5f2e87db402bb..7241687605e292cdd7c6b0c2bd8c5354ad86c24a 100644 (file)
@@ -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
index 4c5eae525a0b6f107f9832858cef3141a13680ed..2a288e14d479c90f04904f8905c725f0bf0b4e24 100644 (file)
@@ -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?
index 14d64bbaa35ef60fca3d0151316015d5c5049e02..bb194633fb6ea7eda271bb6fc09b72a296efa7dc 100644 (file)
@@ -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
index c4828b3c64308402f1517eb13bd906e76dc7d409..a363728238673dfc5137b3c5a6bc7caefb26cf24 100644 (file)
@@ -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?
index 170c729dc7a8922a5697fabb6d2232a73c2c7f03..5d68c0ebfb54383073ad52b97bd2e1da6a031d4e 100644 (file)
@@ -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) {