Skip to content

Commit 3de3156

Browse files
committed
Merge some string literals
1 parent a59615a commit 3de3156

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/main/java/org/apache/commons/pool2/PoolUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private long getNextShrink() {
8686
*/
8787
@Override
8888
public String toString() {
89-
return "ErodingFactor{" + "factor=" + factor +
89+
return "ErodingFactor{factor=" + factor +
9090
", idleHighWaterMark=" + idleHighWaterMark + '}';
9191
}
9292

@@ -323,7 +323,7 @@ public void returnObject(final K key, final V obj) throws Exception {
323323
*/
324324
@Override
325325
public String toString() {
326-
return "ErodingKeyedObjectPool{" + "factor=" +
326+
return "ErodingKeyedObjectPool{factor=" +
327327
erodingFactor + ", keyedPool=" + keyedPool + '}';
328328
}
329329
}
@@ -465,7 +465,7 @@ public void returnObject(final T obj) {
465465
*/
466466
@Override
467467
public String toString() {
468-
return "ErodingObjectPool{" + "factor=" + factor + ", pool=" +
468+
return "ErodingObjectPool{factor=" + factor + ", pool=" +
469469
pool + '}';
470470
}
471471
}
@@ -515,7 +515,7 @@ protected ErodingFactor getErodingFactor(final K key) {
515515
@SuppressWarnings("resource") // getKeyedPool(): ivar access
516516
@Override
517517
public String toString() {
518-
return "ErodingPerKeyKeyedObjectPool{" + "factor=" + factor +
518+
return "ErodingPerKeyKeyedObjectPool{factor=" + factor +
519519
", keyedPool=" + getKeyedPool() + '}';
520520
}
521521
}

src/test/java/org/apache/commons/pool2/WaiterFactory.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,8 @@ public PooledObject<Waiter> makeObject(final K key) {
158158
synchronized (this) {
159159
activeCounts.merge(key, ONE, (v1, v2) -> {
160160
if (v1.intValue() >= maxActivePerKey) {
161-
throw new IllegalStateException("Too many active " +
162-
"instances for key = " + key + ": " + v1.intValue() +
163-
" in circulation " + "with maxActivePerKey = " +
164-
maxActivePerKey);
161+
throw new IllegalStateException("Too many active instances for key = " + key + ": " + v1.intValue()
162+
+ " in circulation with maxActivePerKey = " + maxActivePerKey);
165163
}
166164
return Integer.valueOf(v1.intValue() + 1);
167165
});

0 commit comments

Comments
 (0)