From 8da3aa65f1630619f4cb96d38862eb40ee1fb56a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 22 Sep 2022 19:18:26 +0200 Subject: [PATCH] Please cherry-pick: - no need to check for java.lang.String when it cannot be NULL --- .../features/AddressbookFeatureWebApplicationBean.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java index 43fce283..8780de63 100644 --- a/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/features/AddressbookFeatureWebApplicationBean.java @@ -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; -- 2.39.5