cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [1/4] cassandra git commit: Fix potential resource leak warnings
Date Mon, 15 Feb 2016 09:22:54 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 1944bf507 -> 72cb851e5


Fix potential resource leak warnings

patch by Benjamin Lerer; reviewed by Sylvain Lebresne for CASSANDRA-11083


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

Branch: refs/heads/trunk
Commit: f3b5ff8422adbf2f896656b06f26b2749a24a41b
Parents: 1b201e9
Author: Benjamin Lerer <b.lerer@gmail.com>
Authored: Mon Feb 15 10:01:02 2016 +0100
Committer: Benjamin Lerer <b.lerer@gmail.com>
Committed: Mon Feb 15 10:04:29 2016 +0100

----------------------------------------------------------------------
 src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3b5ff84/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index 5699c5a..2af0016 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -122,6 +122,8 @@ public class OutboundTcpConnectionPool
         return newSocket(endPoint());
     }
 
+    // Closing the socket will close the underlying channel.
+    @SuppressWarnings("resource")
     public static Socket newSocket(InetAddress endpoint) throws IOException
     {
         // zero means 'bind on any available port.'


Mime
View raw message