Browse Source

TransportGitAnon: Suppress resource warning about Socket

Change-Id: Id1f5c0db4273324748a0ead2e6dac58d9114cf86
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.0
David Pursehouse 7 years ago committed by Matthias Sohn
parent
commit
153f7258f9
  1. 1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java

1
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());

Loading…
Cancel
Save