]> git.mxchange.org Git - addressbook-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 22 Sep 2022 17:18:26 +0000 (19:18 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 22 Sep 2022 19:23:44 +0000 (21:23 +0200)
- no need to check for java.lang.String when it cannot be NULL

src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java

index 43fce28307ad764a07dac66059676a837ac22290..8780de6387857d5e6a9b52769f68b313b894afa2 100644 (file)
@@ -61,17 +61,11 @@ public class AddressbookFeatureWebApplicationBean extends BaseAddressbookBean im
                        throw new IllegalArgumentException("feature is empty"); //NOI18N
                }
 
-               // Default is not enabled
-               boolean isEnabled = false;
-
                // Get value from property
                final String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
 
-               // Is the context parameter found?
-               if (contextParameter instanceof String) {
-                       // Is it set?
-                       isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
-               }
+               // Default is not enabled
+               final boolean isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE);
 
                // Return status
                return isEnabled;