From: Roland Häder Date: Mon, 29 Aug 2016 15:37:15 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0983f4735c8467909a6f764e143fcc119c30096d;p=jjobs-war.git Please cherry-pick: - Use Boolean.parseBoolean() instead of own code (reduces code-base) --- diff --git a/src/java/org/mxchange/jjobs/beans/BaseJobsController.java b/src/java/org/mxchange/jjobs/beans/BaseJobsController.java index a9f461ab..b0f7a3ca 100644 --- a/src/java/org/mxchange/jjobs/beans/BaseJobsController.java +++ b/src/java/org/mxchange/jjobs/beans/BaseJobsController.java @@ -122,7 +122,7 @@ public abstract class BaseJobsController implements Serializable { String contextParameter = this.getStringContextParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N // Is it set and true? - boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.equals("true"))); //NOI18N + boolean isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE); // Return it return isEnabled; diff --git a/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java b/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java index 67807558..988c55fe 100644 --- a/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java +++ b/src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java @@ -51,10 +51,10 @@ public class JobsFeatureWebApplicationBean extends BaseJobsController implements // Try it as an NPE may come try { // Get value from property - String value = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N + String contextParameter = this.getStringContextParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N // Is it set? - isEnabled = (value.toLowerCase().equals("true")); //NOI18N + isEnabled = (Boolean.parseBoolean(contextParameter) == Boolean.TRUE); } catch (final NullPointerException ex) { // Ignored }