Skip to content

Commit 0842fee

Browse files
committed
Merge some string literals
1 parent e607d18 commit 0842fee

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ public class BasicDataSourceFactory implements ObjectFactory {
174174
"Property " + NUPROP_MAX_ACTIVE + " is not used in DBCP2, use " + PROP_MAX_TOTAL + " instead. "
175175
+ PROP_MAX_TOTAL + " default value is " + GenericObjectPoolConfig.DEFAULT_MAX_TOTAL + ".");
176176
NUPROP_WARNTEXT.put(NUPROP_REMOVE_ABANDONED,
177-
"Property " + NUPROP_REMOVE_ABANDONED + " is not used in DBCP2," + " use one or both of "
177+
"Property " + NUPROP_REMOVE_ABANDONED + " is not used in DBCP2, use one or both of "
178178
+ PROP_REMOVE_ABANDONED_ON_BORROW + " or " + PROP_REMOVE_ABANDONED_ON_MAINTENANCE + " instead. "
179179
+ "Both have default value set to false.");
180180
NUPROP_WARNTEXT.put(NUPROP_MAXWAIT,
181-
"Property " + NUPROP_MAXWAIT + " is not used in DBCP2" + " , use " + PROP_MAX_WAIT_MILLIS + " instead. "
181+
"Property " + NUPROP_MAXWAIT + " is not used in DBCP2 , use " + PROP_MAX_WAIT_MILLIS + " instead. "
182182
+ PROP_MAX_WAIT_MILLIS + " default value is " + BaseObjectPoolConfig.DEFAULT_MAX_WAIT
183183
+ ".");
184184
}

src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void connectionClosed(final ConnectionEvent event) {
111111
try {
112112
pool.returnObject(pci);
113113
} catch (final Exception e) {
114-
System.err.println("CLOSING DOWN CONNECTION AS IT COULD " + "NOT BE RETURNED TO THE POOL");
114+
System.err.println("CLOSING DOWN CONNECTION AS IT COULD NOT BE RETURNED TO THE POOL");
115115
pc.removeConnectionEventListener(this);
116116
try {
117117
doDestroyObject(pci);

src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public Connection getConnection() throws SQLException {
236236
public Connection getConnection(final String userName, final String userPassword) throws SQLException {
237237
if (instanceKey == null) {
238238
throw new SQLException("Must set the ConnectionPoolDataSource "
239-
+ "through setDataSourceName or setConnectionPoolDataSource" + " before calling getConnection.");
239+
+ "through setDataSourceName or setConnectionPoolDataSource before calling getConnection.");
240240
}
241241
getConnectionCalled = true;
242242
PooledConnectionAndInfo info = null;
@@ -258,7 +258,7 @@ public Connection getConnection(final String userName, final String userPassword
258258
// Password has not changed, so refuse client, but return connection to the pool
259259
closeDueToException(info);
260260
throw new SQLException(
261-
"Given password did not match password used" + " to create the PooledConnection.", ex);
261+
"Given password did not match password used to create the PooledConnection.", ex);
262262
} catch (final javax.naming.NamingException ne) {
263263
throw new SQLException("NamingException encountered connecting to database", ne);
264264
}
@@ -777,7 +777,7 @@ public void setDataSourceName(final String dataSourceName) {
777777
+ "set using setConnectionPoolDataSource.");
778778
}
779779
if (this.dataSourceName != null) {
780-
throw new IllegalStateException("The DataSourceName has already been set. " + "It cannot be altered.");
780+
throw new IllegalStateException("The DataSourceName has already been set. It cannot be altered.");
781781
}
782782
this.dataSourceName = dataSourceName;
783783
instanceKey = InstanceKeyDataSourceFactory.registerNewInstance(this);
@@ -1266,8 +1266,8 @@ protected ConnectionPoolDataSource testCPDS(final String userName, final String
12661266
}
12671267
final Object ds = ctx.lookup(dataSourceName);
12681268
if (!(ds instanceof ConnectionPoolDataSource)) {
1269-
throw new SQLException("Illegal configuration: " + "DataSource " + dataSourceName + " ("
1270-
+ ds.getClass().getName() + ")" + " doesn't implement javax.sql.ConnectionPoolDataSource");
1269+
throw new SQLException("Illegal configuration: DataSource " + dataSourceName + " ("
1270+
+ ds.getClass().getName() + ") doesn't implement javax.sql.ConnectionPoolDataSource");
12711271
}
12721272
cpds = (ConnectionPoolDataSource) ds;
12731273
}

src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void connectionClosed(final ConnectionEvent event) {
101101
try {
102102
pool.returnObject(pci.getUserPassKey(), pci);
103103
} catch (final Exception e) {
104-
System.err.println("CLOSING DOWN CONNECTION AS IT COULD " + "NOT BE RETURNED TO THE POOL");
104+
System.err.println("CLOSING DOWN CONNECTION AS IT COULD NOT BE RETURNED TO THE POOL");
105105
pc.removeConnectionEventListener(this);
106106
try {
107107
pool.invalidateObject(pci.getUserPassKey(), pci);

0 commit comments

Comments
 (0)