camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject git commit: CAMEL-6521: Fixed the failed build when Java 6 is in use.
Date Tue, 09 Jul 2013 22:29:27 GMT
Updated Branches:
  refs/heads/camel-2.11.x e30571690 -> 9ef551daf


CAMEL-6521: Fixed the failed build when Java 6 is in use.


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

Branch: refs/heads/camel-2.11.x
Commit: 9ef551daf79f89766a70e8b4ff8c075686c7b455
Parents: e305716
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Tue Jul 9 15:49:34 2013 +0200
Committer: Hadrian Zbarcea <hzbarcea@gmail.com>
Committed: Tue Jul 9 17:27:53 2013 -0400

----------------------------------------------------------------------
 .../org/apache/camel/impl/ActiveMQUuidGenerator.java   | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9ef551da/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
index 297860c..3afe604 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ActiveMQUuidGenerator.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.impl;
 
+import java.io.IOException;
 import java.net.ServerSocket;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.camel.spi.UuidGenerator;
-import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.InetAddressUtil;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
@@ -78,7 +78,16 @@ public class ActiveMQUuidGenerator implements UuidGenerator {
                     LOG.warn("Cannot generate unique stub by using DNS and binding to local
port: " + idGeneratorPort + " due " + ioe.getMessage());
                 }
             } finally {
-                IOHelper.close(ss);
+                try {
+                    // TODO: replace the following line with IOHelper.close(ss) when Java
6 support is dropped
+                    ss.close();
+                } catch (IOException ioe) {
+                    if (LOG.isTraceEnabled()) {
+                        LOG.trace("Closing the server socket failed", ioe);
+                    } else {
+                        LOG.warn("Closing the server socket failed" + " due " + ioe.getMessage());
+                    }
+                }
             }
         }
 


Mime
View raw message