You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gz...@apache.org on 2016/03/27 18:20:22 UTC

[1/2] camel git commit: Mark constant final

Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 76abfb4c5 -> c54b3628b


Mark constant final

Signed-off-by: Gregor Zurowski <gr...@zurowski.org>

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

Branch: refs/heads/camel-2.15.x
Commit: 0a4c7e30c9c568e8909441be2cb8febfaa70bf44
Parents: 76abfb4
Author: Gregor Zurowski <gr...@zurowski.org>
Authored: Fri Jan 22 15:54:27 2016 +0100
Committer: Gregor Zurowski <gr...@zurowski.org>
Committed: Sun Mar 27 18:02:33 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/netty4/NettyProducerHangTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0a4c7e30/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
index 9a51188..2b4e74d 100644
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
+++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
@@ -27,7 +27,7 @@ import org.junit.Test;
 
 public class NettyProducerHangTest extends CamelTestSupport {
 
-    private static int PORT = 4093;
+    private static final int PORT = 4093;
 
     @Test
     public void nettyProducerHangsOnTheSecondRequestToTheSocketWhichIsClosed() throws Exception {


[2/2] camel git commit: Replace try-with-resources to avoid CS warnings

Posted by gz...@apache.org.
Replace try-with-resources to avoid CS warnings

Use traditional try..finally instead of Java 7's try-with-resources to
avoid warnings caused by older Checkstyle version and configuration.

Signed-off-by: Gregor Zurowski <gr...@zurowski.org>

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

Branch: refs/heads/camel-2.15.x
Commit: c54b3628b66217c5785a9298d708fa214fd9e471
Parents: 0a4c7e3
Author: Gregor Zurowski <gr...@zurowski.org>
Authored: Sun Mar 27 18:18:34 2016 +0200
Committer: Gregor Zurowski <gr...@zurowski.org>
Committed: Sun Mar 27 18:18:34 2016 +0200

----------------------------------------------------------------------
 .../camel/component/netty4/NettyProducerHangTest.java    | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c54b3628/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
index 2b4e74d..5af845c 100644
--- a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
+++ b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/NettyProducerHangTest.java
@@ -72,8 +72,13 @@ public class NettyProducerHangTest extends CamelTestSupport {
         Socket soc = serverSocket.accept();
 
         log.info("Open socket and accept data");
-        try (InputStream is = soc.getInputStream();
-                OutputStream os = soc.getOutputStream()) {
+
+        InputStream is = null;
+        OutputStream os = null;
+
+        try {
+            is = soc.getInputStream();
+            os = soc.getOutputStream();
             // read first message
             is.read(buf);
 
@@ -85,6 +90,8 @@ public class NettyProducerHangTest extends CamelTestSupport {
 
             // do not reply, just close socket (emulate network problem)
         } finally {
+            os.close();
+            is.close();
             soc.close();
             serverSocket.close();
         }