aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-03-15 14:09:50 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2018-03-24 22:15:43 +0100
commit153f7258f98ad27f268d65694e862318591474c2 (patch)
treeaf45e490eb00a85e8cf3402443f04b6e18b4afa6
parent76b4ed6a8503ea3f9514d931bf97e85910c319f5 (diff)
downloadjgit-153f7258f98ad27f268d65694e862318591474c2.tar.gz
jgit-153f7258f98ad27f268d65694e862318591474c2.zip
TransportGitAnon: Suppress resource warning about Socket
Change-Id: Id1f5c0db4273324748a0ead2e6dac58d9114cf86 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java1
1 files changed, 1 insertions, 0 deletions
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());