]> source.dussan.org Git - jgit.git/commitdiff
Silence warnings about unclosed BasePackPushConnection 48/197148/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Nov 2022 19:32:37 +0000 (20:32 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 20 Nov 2022 19:32:37 +0000 (20:32 +0100)
Change-Id: If52e8462e6222dd58d1004dd5ac174a27d96d098

org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java

index 2019c263fb7d053887ec59e34731b056c5d8bd2e..b1344b7aa2b8421b1eece6498cb0328b54e216e9 100644 (file)
@@ -248,6 +248,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                try (Transport transport = Transport.open(uri)) {
                        try (PushConnection pushConnection = transport.openPush()) {
                                assertTrue(pushConnection instanceof BasePackPushConnection);
+                               @SuppressWarnings("resource")
                                BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
                                assertEquals(true, basePackPushConnection.isUseBitmaps());
                        }
@@ -257,6 +258,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                        transport.setPushUseBitmaps(true);
                        try (PushConnection pushConnection = transport.openPush()) {
                                assertTrue(pushConnection instanceof BasePackPushConnection);
+                               @SuppressWarnings("resource")
                                BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
                                assertEquals(true, basePackPushConnection.isUseBitmaps());
                        }
@@ -266,6 +268,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                        transport.setPushUseBitmaps(false);
                        try (PushConnection pushConnection = transport.openPush()) {
                                assertTrue(pushConnection instanceof BasePackPushConnection);
+                               @SuppressWarnings("resource")
                                BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
                                assertEquals(false, basePackPushConnection.isUseBitmaps());
                        }