We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3bf48c commit ecb04bbCopy full SHA for ecb04bb
spring-integration-core/src/main/java/org/springframework/integration/util/SimplePool.java
@@ -272,6 +272,7 @@ public synchronized void close() {
272
removeAllIdleItems();
273
}
274
275
+ @SuppressWarnings("serial")
276
private static class PoolSemaphore extends Semaphore {
277
278
PoolSemaphore(int permits) {
@@ -280,7 +281,7 @@ private static class PoolSemaphore extends Semaphore {
280
281
282
@Override
283
public void reducePermits(int reduction) { // NOSONAR increases visibility
- super.reducePermits(reduction);
284
+ super.reducePermits(reduction > availablePermits() ? availablePermits() : reduction);
285
286
287
0 commit comments