From: David Pursehouse Date: Thu, 15 Mar 2018 05:09:50 +0000 (+0900) Subject: TransportGitAnon: Suppress resource warning about Socket X-Git-Tag: v5.0.0.201805151920-m7~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=153f7258f98ad27f268d65694e862318591474c2;p=jgit.git TransportGitAnon: Suppress resource warning about Socket Change-Id: Id1f5c0db4273324748a0ead2e6dac58d9114cf86 Signed-off-by: David Pursehouse --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java index 816187ee0c..cbf77bb0b2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java @@ -142,6 +142,7 @@ class TransportGitAnon extends TcpTransport implements PackTransport { Socket openConnection() throws TransportException { final int tms = getTimeout() > 0 ? getTimeout() * 1000 : 0; final int port = uri.getPort() > 0 ? uri.getPort() : GIT_PORT; + @SuppressWarnings("resource") // Closed by the caller final Socket s = new Socket(); try { final InetAddress host = InetAddress.getByName(uri.getHost());