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

src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeatureWebApplicationBean.java
src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java
src/java/org/mxchange/pizzaapplication/converter/mobileprovider/PizzaMobileProviderConverter.java
src/java/org/mxchange/pizzaapplication/validator/business/basicdata/PizzaCompanyNameValidator.java
src/java/org/mxchange/pizzaapplication/validator/phone/abroad/PizzaAbroadDialValidator.java

index f520b329bb3bb8c874a8a77b0a149298db9515b1..a569e8eb77856b3476ddeb48068a6622f76c5731 100644 (file)
@@ -57,7 +57,7 @@ public class PizzaFeatureWebApplicationBean extends BasePizzaBean implements Piz
                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 abcc9bdc6c6335d9d808039f90efe75dd568d376..2b275aaa4cac8d1163bbc49aeff1024be6d43d4c 100644 (file)
@@ -78,7 +78,7 @@ public class PizzaCountryConverter implements Converter<Country> {
                // Try this better
                try {
                        // Convert it to long
-                       final Long countryId = Long.parseLong(submittedValue);
+                       final Long countryId = Long.valueOf(submittedValue);
 
                        // Category id should not be below 1
                        assert (countryId > 0) : "countryId is smaller than one: " + countryId; //NOI18N
index 6c5bccafbd04e8df1dec04451c68b7770cda565f..11c84562eb1bbaae8ec687d1ad03b6b1bba46abd 100644 (file)
@@ -77,7 +77,7 @@ public class PizzaMobileProviderConverter implements Converter<MobileProvider> {
                // Try this better
                try {
                        // Convert it to long
-                       final Long providerId = Long.parseLong(submittedValue);
+                       final Long providerId = Long.valueOf(submittedValue);
 
                        // Category id should not be below 1
                        assert (providerId > 0) : "providerId is smaller than one: " + providerId; //NOI18N
index d45804e0b40ed2be9a0bb496ab3c3f4226c64b24..d2cb1afc4c267ac42f1d7ae9c64912c9ddfa8dd5 100644 (file)
@@ -86,7 +86,7 @@ public class PizzaCompanyNameValidator extends BaseStringValidator {
                        }
 
                        // Securely cast it
-                       checkExisting = Boolean.parseBoolean((String) attribute);
+                       checkExisting = Boolean.valueOf((String) attribute);
                }
 
                // Check if name is already used
index 65c4c1d1b21233b5af3e2033d389f84a9ec43bf5..331d81bda8a4f6ba1cb89f03cad7bc8010f60227 100644 (file)
@@ -53,7 +53,7 @@ public class PizzaAbroadDialValidator 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) {