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

src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java

index 08bd4a196bea8bc124bb093ba3ce19f2687bbcd9..f3b806cb6fdf7a7cbbe851a25a27bd9bb0512759 100644 (file)
@@ -61,17 +61,11 @@ public class JobsFeatureWebApplicationBean extends BaseJobsBean implements JobsF
                        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;