Repository: camel Updated Branches: refs/heads/camel-2.15.x f880feb6a -> cd7300692 refs/heads/master d42b203c2 -> d406c87f1
CAMEL-9196: Timeout must be a positive value when calling stop route with a timeout value. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/edee114c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/edee114c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/edee114c Branch: refs/heads/master Commit: edee114c780423d248a37b631d64ac81db7dee81 Parents: d42b203 Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Oct 7 07:15:36 2015 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Oct 7 07:15:36 2015 +0200 ---------------------------------------------------------------------- .../java/org/apache/camel/impl/DefaultShutdownStrategy.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/edee114c/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java index 0657f15..2eac21e 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java @@ -166,6 +166,11 @@ public class DefaultShutdownStrategy extends ServiceSupport implements ShutdownS protected boolean doShutdown(CamelContext context, List<RouteStartupOrder> routes, long timeout, TimeUnit timeUnit, boolean suspendOnly, boolean abortAfterTimeout, boolean forceShutdown) throws Exception { + // timeout must be a positive value + if (timeout <= 0) { + throw new IllegalArgumentException("Timeout must be a positive value"); + } + // just return if no routes to shutdown if (routes.isEmpty()) { return true;