Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.6.0
-
None
Description
There is the same logic error in all three factory methods in the if clause condition:
if (props != null |
|| props.containsKey(JDBC_MIN_POOL_SIZE)
|
|| props.containsKey(JDBC_MAX_POOL_SIZE)
|
|| props.containsKey(JDBC_MAX_IDLE_TIME)) {
|
return createPoolDataSource(props); |
} else { |
return createBasicDataSource(props); |
}
|
"Else" clause can presently never be reached, as even in the case of props==null, the second term in the condition causes a NullPointerException.
Presumably, the condition should have looked like:
props != null && |
(props.containsKey(JDBC_MIN_POOL_SIZE)
|
|| props.containsKey(JDBC_MAX_POOL_SIZE)
|
|| props.containsKey(JDBC_MAX_IDLE_TIME))
|