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

src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java
src/java/org/mxchange/addressbook/converter/country/AddressbookCountryConverter.java
src/java/org/mxchange/addressbook/converter/mobileprovider/AddressbookMobileProviderConverter.java
src/java/org/mxchange/addressbook/validator/business/basicdata/AddressbookBasicDataCompanyNameValidator.java
src/java/org/mxchange/addressbook/validator/business/basicdata/AddressbookBasicDataCompanyShortNameValidator.java
src/java/org/mxchange/addressbook/validator/business/basicdata/roadnumber/AddressbookBasicDataCompanyRoadNumberValidator.java
src/java/org/mxchange/addressbook/validator/business/headquarter/AddressbookHeadquarterCompanyNameValidator.java
src/java/org/mxchange/addressbook/validator/phone/abroad/AddressbookAbroadDialValidator.java

index a0212aa2e035ece23c6ff71d90048afdb4b1a313..d44357c96b21ddce586c3f68e9a8096e12b978e3 100644 (file)
@@ -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;
index 5ddee2aac0399605311bf240aa122c97fa2ccaf3..7b9b4dcb543dae035d7d9cda01c6dd63bfa631be 100644 (file)
@@ -60,7 +60,7 @@ public class AddressbookCountryConverter 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 3547fe3615988d5d14f479b9ec91dd8fa1958014..caee650fe4930e1c8c014c490b7a878e144f4c3e 100644 (file)
@@ -60,7 +60,7 @@ public class AddressbookMobileProviderConverter implements Converter<MobileProvi
                // 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 a9aa1b7aaf17347d633f0a35ed08a476831968ef..67b8a51db5a81556ab48fdb560edbb21b13323a4 100644 (file)
@@ -77,7 +77,7 @@ public class AddressbookBasicDataCompanyNameValidator extends BaseStringValidato
                        }
 
                        // Securely cast it
-                       checkExisting = Boolean.parseBoolean((String) attribute);
+                       checkExisting = Boolean.valueOf((String) attribute);
                }
 
                // Check if name is already used
index b087a254bebe584c563d3ecfca9dea99c5922d1f..3759eb55da0aeb30d5cd28250272e2027c0f478e 100644 (file)
@@ -71,7 +71,7 @@ public class AddressbookBasicDataCompanyShortNameValidator extends BaseStringVal
                        }
 
                        // Securely cast it
-                       checkExisting = Boolean.parseBoolean((String) attribute);
+                       checkExisting = Boolean.valueOf((String) attribute);
                }
 
                // Is the instance there?
index ef5c2b79d4676676246064203a034bd20806a259..6af4fb11f89424ec6fe9288470baf571059cc485 100644 (file)
@@ -77,7 +77,7 @@ public class AddressbookBasicDataCompanyRoadNumberValidator extends BaseStringVa
                        }
 
                        // Securely cast it
-                       checkExisting = Boolean.parseBoolean((String) attribute);
+                       checkExisting = Boolean.valueOf((String) attribute);
                }
 
                // Check if name is already used
index 2e75ea86a4e1911ba66ee19624cf24162035bccb..d69b07622aec66cadbd3637ba8d17c7a605f6e2a 100644 (file)
@@ -71,7 +71,7 @@ public class AddressbookHeadquarterCompanyNameValidator extends BaseStringValida
                        }
 
                        // Securely cast it
-                       checkExisting = Boolean.parseBoolean((String) attribute);
+                       checkExisting = Boolean.valueOf((String) attribute);
                }
 
                // Is the instance there?
index 1df2d54f1acab978628a2f3a706cb258dbb7c54d..c10760e06a73e3d871ff675a195837ec85d02c80 100644 (file)
@@ -53,7 +53,7 @@ public class AddressbookAbroadDialValidator 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) {