Skip to content

Commit

Permalink
[CONJ-780] OSGi DataSourceFactory implementation correction
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Apr 15, 2020
1 parent f0e4180 commit 0e6dc64
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public class MariaDbDataSourceFactory implements DataSourceFactory {
@Override
public DataSource createDataSource(Properties props) throws SQLException {
if (props != null
|| props.containsKey(JDBC_MIN_POOL_SIZE)
|| props.containsKey(JDBC_MAX_POOL_SIZE)
|| props.containsKey(JDBC_MAX_IDLE_TIME)) {
&& (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);
Expand All @@ -79,9 +79,9 @@ public DataSource createDataSource(Properties props) throws SQLException {
public ConnectionPoolDataSource createConnectionPoolDataSource(Properties props)
throws SQLException {
if (props != null
|| props.containsKey(JDBC_MIN_POOL_SIZE)
|| props.containsKey(JDBC_MAX_POOL_SIZE)
|| props.containsKey(JDBC_MAX_IDLE_TIME)) {
&& (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);
Expand All @@ -91,9 +91,9 @@ public ConnectionPoolDataSource createConnectionPoolDataSource(Properties props)
@Override
public XADataSource createXADataSource(Properties props) throws SQLException {
if (props != null
|| props.containsKey(JDBC_MIN_POOL_SIZE)
|| props.containsKey(JDBC_MAX_POOL_SIZE)
|| props.containsKey(JDBC_MAX_IDLE_TIME)) {
&& (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);
Expand Down

0 comments on commit 0e6dc64

Please sign in to comment.