diff options
Diffstat (limited to 'policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java')
-rw-r--r-- | policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java b/policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java index 755e7a18..285a9a0a 100644 --- a/policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java +++ b/policy-core/src/main/java/org/onap/policy/drools/util/FeatureEnabledChecker.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2018, 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +26,7 @@ import lombok.AccessLevel; import lombok.NoArgsConstructor; /** - * Checks whether or not a feature is enabled. + * Checks whether a feature is enabled. */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public class FeatureEnabledChecker { @@ -40,6 +41,6 @@ public class FeatureEnabledChecker { */ public static boolean isFeatureEnabled(Properties props, String propName) { String val = props.getProperty(propName); - return (val != null && Boolean.valueOf(val)); + return (Boolean.parseBoolean(val)); } } |