svn commit: r566602 - /activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r566602 - /activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java

jstrachan-2
Author: jstrachan
Date: Thu Aug 16 02:28:53 2007
New Revision: 566602

URL: http://svn.apache.org/viewvc?view=rev&rev=566602
Log:
made it easier to invoke the main using varargs in Java 5

Modified:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java?view=diff&rev=566602&r1=566601&r2=566602
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/Main.java Thu Aug 16 02:28:53 2007
@@ -80,7 +80,7 @@
         });
     }
 
-    public static void main(String[] args) {
+    public static void main(String... args) {
         Main main = new Main();
         main.run(args);
     }
@@ -302,7 +302,10 @@
         while (!completed.get()) {
             try {
                 if (duration > 0) {
-                    latch.await(duration, getTimeUnit());
+                    TimeUnit unit = getTimeUnit();
+                    LOG.info("Waiting for: " + duration + " " + unit);
+                    latch.await(duration, unit);
+                    completed.set(true);
                 }
                 else {
                     latch.await();