Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
jcs-1.2.7.9.2
-
None
-
None
-
None
Description
In ThreadPoolManager.loadConfig() method, the following code to retrieve the 'useBoundary' property will always result in calling config.setUseBoundary() with a value of false:
config.setUseBoundary( Boolean.getBoolean( (String) props.get( root + ".useBoundary" ) ) );
The problem stems from Boolean.getBoolean() method always searches for the supplied parameter as a System property (i.e., set via the -D command line parameter).
Also, props.get(root + ".useBoundary" ) will return the value of the property; which in turn is used as the PROPERTY NAME to retrieve from System.properties. This results in searching for a system property named either "true" or "false"!!
I think the code should read:
config.setUseBoundary( Boolean.valueOf(props.getProperty( root + ".useBoundary" ) ) );