diff options
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index 5089770421..420e489712 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -1169,9 +1169,11 @@ public class SmartClientSmartServerTest extends HttpTestCase { @Test public void testInvalidWant() throws Exception { - @SuppressWarnings("resource") - ObjectId id = new ObjectInserter.Formatter().idFor(Constants.OBJ_BLOB, - "testInvalidWant".getBytes(UTF_8)); + ObjectId id; + try (ObjectInserter.Formatter formatter = new ObjectInserter.Formatter()) { + id = formatter.idFor(Constants.OBJ_BLOB, + "testInvalidWant".getBytes(UTF_8)); + } Repository dst = createBareRepository(); try (Transport t = Transport.open(dst, remoteURI); |