]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Mon, 29 Aug 2016 15:37:15 +0000 (17:37 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 29 Aug 2016 17:34:25 +0000 (19:34 +0200)
- Use Boolean.parseBoolean() instead of own code (reduces code-base)

src/java/org/mxchange/jjobs/beans/BaseJobsController.java
src/java/org/mxchange/jjobs/beans/features/JobsFeatureWebApplicationBean.java

index a9f461ab756ed5bbe2cb4c4b700634ff96dfe256..b0f7a3ca7775abe1980176f99ec2458728ae8fb2 100644 (file)
@@ -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;
index 67807558c10735426989d1784ca456c20cbcff55..988c55fe4ccd696e97d2e46aa875170f1c70d6f8 100644 (file)
@@ -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
                }