From 0983f4735c8467909a6f764e143fcc119c30096d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 29 Aug 2016 17:37:15 +0200 Subject: [PATCH] Please cherry-pick: - Use Boolean.parseBoolean() instead of own code (reduces code-base) --- src/java/org/mxchange/jjobs/beans/BaseJobsController.java | 2 +- .../jjobs/beans/features/JobsFeatureWebApplicationBean.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 } -- 2.39.5