]> git.mxchange.org Git - jfinancials-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:37:36 +0000 (04:37 +0100)
- fixed some issues reported by Netbeans' inspector, like Foo.parseFoo() versus
  Foo.valueOf()

src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java
src/java/org/mxchange/jfinancials/converter/country/FinancialsCountryConverter.java
src/java/org/mxchange/jfinancials/converter/mobileprovider/FinancialsMobileProviderConverter.java
src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyNameValidator.java
src/java/org/mxchange/jfinancials/validator/business/basicdata/FinancialsBasicDataCompanyShortNameValidator.java
src/java/org/mxchange/jfinancials/validator/business/basicdata/roadnumber/FinancialsBasicDataCompanyRoadNumberValidator.java
src/java/org/mxchange/jfinancials/validator/business/headquarter/FinancialsHeadquarterCompanyNameValidator.java
src/java/org/mxchange/jfinancials/validator/phone/abroad/FinancialsAbroadDialValidator.java

index 840a314b8177eef9cdeb9d5edc5c86d21d49cb8b..42994398bcf79d96fbb4c6bfdd51693e2909c8e8 100644 (file)
@@ -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;
index 929569151d000daa6e84cbc6428b82d1ee6f3f33..d64c2520f8c19b1a7cab38bb373557be71acc09a 100644 (file)
@@ -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);
index 05221b5d61499a84a3bee966f43bc33249a9fa9d..4614ab98b215b5408201f8aaca8ad6ea6171c11b 100644 (file)
@@ -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);
index 939edc3c80b3358a5e56798cc65ec0ea93a8750d..51e9d648c3ffcc1bede21fff02bf74797aedf952 100644 (file)
@@ -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
index c5128ba748d6b862773e31b60d6357686c3745a1..364703e44f83cc3d9ef84e50b93912eb5ef6951f 100644 (file)
@@ -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?
index 29f21406a8b45af7e0ffb84548e06db03c8b7647..04d11170ae133c15cd99e89a52052bed1e490c60 100644 (file)
@@ -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
index 774b26b764989d97273c83ae52fb33378aad1f06..b0ddc5fd4e3a5f9c140abad5bbb8eb52e7c8348c 100644 (file)
@@ -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?
index 410ac7bae522c35cd87687139dd873883d5f453b..8bce832b7c48d89e49fb1ed34b3d8a597c8abf72 100644 (file)
@@ -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) {