]> source.dussan.org Git - jgit.git/commitdiff
TransportGitAnon: Suppress resource warning about Socket 64/119464/5
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 15 Mar 2018 05:09:50 +0000 (14:09 +0900)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 24 Mar 2018 21:15:43 +0000 (22:15 +0100)
Change-Id: Id1f5c0db4273324748a0ead2e6dac58d9114cf86
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java

index 816187ee0ca589c13b101370ecd717da8dec3974..cbf77bb0b23c494deebb5f522ec83541bbf97d9e 100644 (file)
@@ -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());