From: Roland Häder Date: Thu, 22 Sep 2022 17:18:26 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2b67f221827ebd2241ad5d49f8debda1df6dd90f;p=jfinancials-war.git Please cherry-pick: - no need to check for java.lang.String when it cannot be NULL --- diff --git a/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java b/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java index 9c5ee9bd..fbdc785a 100644 --- a/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/jfinancials/beans/features/FinancialsFeatureWebApplicationBean.java @@ -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;