diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/AbstractMessageBarrierHandler.java b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/AbstractMessageBarrierHandler.java index d7f38c50b7..3b3a7f5410 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/AbstractMessageBarrierHandler.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/aggregator/AbstractMessageBarrierHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -157,7 +157,6 @@ public abstract class AbstractMessageBarrierHandler 0, "'trackedCorrelationIdCapacity' must be a positive value"); this.trackedCorrelationIdCapacity = trackedCorrelationIdCapacity; } @@ -166,7 +165,7 @@ public abstract class AbstractMessageBarrierHandler= 0, "'timeout' must not be negative"); + Assert.isTrue(timeout >= 0, "'timeout' must be a positive value"); this.timeout = timeout; } @@ -196,7 +195,9 @@ public abstract class AbstractMessageBarrierHandler(this.trackedCorrelationIdCapacity); + if (this.trackedCorrelationIdCapacity > 0) { + this.trackedCorrelationIds = new ArrayBlockingQueue(this.trackedCorrelationIdCapacity); + } if (this.autoStartup) { this.start(); } @@ -240,7 +241,7 @@ public abstract class AbstractMessageBarrierHandler