public ConnectionPoolConfig merge(final ConnectionPoolConfig other,
                                      final boolean copyNulls,
                                      final boolean copyDefaults) {

        if (other == null) {
            return this;
        } else {
            return new ConnectionPoolConfig(
                    PropertyUtil.mergeValues(
                            other.cachePrepStmts,
                            cachePrepStmts,
                            DEFAULTS.cachePrepStmts,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.prepStmtCacheSize,
                            prepStmtCacheSize,
                            DEFAULTS.prepStmtCacheSize,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.prepStmtCacheSqlLimit,
                            prepStmtCacheSqlLimit,
                            DEFAULTS.prepStmtCacheSqlLimit,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.connectionTimeout,
                            connectionTimeout,
                            DEFAULTS.connectionTimeout,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.idleTimeout,
                            idleTimeout,
                            DEFAULTS.idleTimeout,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.maxLifetime,
                            maxLifetime,
                            DEFAULTS.maxLifetime,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.leakDetectionThreshold,
                            leakDetectionThreshold,
                            DEFAULTS.leakDetectionThreshold,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.minimumIdle,
                            minimumIdle,
                            DEFAULTS.minimumIdle,
                            copyNulls,
                            copyDefaults),
                    PropertyUtil.mergeValues(
                            other.maxPoolSize,
                            maxPoolSize,
                            DEFAULTS.maxPoolSize,
                            copyNulls,
                            copyDefaults));
        }
    }
Merges the non-null values of other into this. If other is null return this.
stroom-config/stroom-config-common/src/main/java/stroom/config/common/ConnectionPoolConfig.java