camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-6504 fixed the IndexOutOfBoundsException when call Main with -h option
Date Wed, 03 Jul 2013 02:23:24 GMT
CAMEL-6504 fixed the IndexOutOfBoundsException when call Main with -h option


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ad1824a5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ad1824a5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ad1824a5

Branch: refs/heads/camel-2.10.x
Commit: ad1824a5fdffc329b8a387cf3d0891e1129977e4
Parents: decf981
Author: Willem Jiang <ningjiang@apache.org>
Authored: Wed Jul 3 10:14:34 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Wed Jul 3 10:20:27 2013 +0800

----------------------------------------------------------------------
 camel-core/src/main/java/org/apache/camel/main/Main.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ad1824a5/camel-core/src/main/java/org/apache/camel/main/Main.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/main/Main.java b/camel-core/src/main/java/org/apache/camel/main/Main.java
index a8bb2c9..165245b 100644
--- a/camel-core/src/main/java/org/apache/camel/main/Main.java
+++ b/camel-core/src/main/java/org/apache/camel/main/Main.java
@@ -111,7 +111,9 @@ public class Main extends MainSupport {
 
     protected void doStop() throws Exception {
         super.doStop();
-        getCamelContexts().get(0).stop();
+        if (getCamelContexts().size() > 0) {
+            getCamelContexts().get(0).stop();
+        }
     }
 
     protected ProducerTemplate findOrCreateCamelTemplate() {


Mime
View raw message