]> git.mxchange.org Git - jfinancials-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 17:18:26 +0000 (19:18 +0200)
- no need to check for java.lang.String when it cannot be NULL

src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java

index 9c5ee9bdefcd86dbf9ae2078a901cc34111e5bc7..fbdc785a14dc50e7a27c3d7206acadca3f139fb2 100644 (file)
@@ -61,17 +61,11 @@ public class FinancialsFeatureWebApplicationBean extends BaseFinancialsBean impl
                        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;