Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0554018E83 for ; Mon, 15 Feb 2016 09:04:37 +0000 (UTC) Received: (qmail 2175 invoked by uid 500); 15 Feb 2016 09:04:36 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 2143 invoked by uid 500); 15 Feb 2016 09:04:36 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 2132 invoked by uid 99); 15 Feb 2016 09:04:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 15 Feb 2016 09:04:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B4914E057C; Mon, 15 Feb 2016 09:04:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: blerer@apache.org To: commits@cassandra.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cassandra git commit: Fix potential resource leak warnings Date: Mon, 15 Feb 2016 09:04:36 +0000 (UTC) Repository: cassandra Updated Branches: refs/heads/cassandra-2.2 1b201e959 -> f3b5ff842 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/cassandra-2.2 Commit: f3b5ff8422adbf2f896656b06f26b2749a24a41b Parents: 1b201e9 Author: Benjamin Lerer Authored: Mon Feb 15 10:01:02 2016 +0100 Committer: Benjamin Lerer 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.'