From: Roland Haeder Date: Tue, 9 Aug 2016 20:19:49 +0000 (+0200) Subject: Use own method getStringContextParameter() for a bit encapsulation and DRY: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e2ae8efa37fc505c2532606886d122f0cd91ac7d;p=jjobs-war.git Use own method getStringContextParameter() for a bit encapsulation and DRY: DRY = Don't Repeat Yourself (avoid duplicate code which means duplicated maintenance of code) Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/BaseJobsController.java b/src/java/org/mxchange/jjobs/beans/BaseJobsController.java index f9a5adde..2a4a4ebb 100644 --- a/src/java/org/mxchange/jjobs/beans/BaseJobsController.java +++ b/src/java/org/mxchange/jjobs/beans/BaseJobsController.java @@ -92,7 +92,7 @@ public abstract class BaseJobsController implements Serializable { } // Try to get context parameter - String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N + 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