diff options
author | Hugo Arès <hugo.ares@ericsson.com> | 2015-05-28 15:59:48 -0400 |
---|---|---|
committer | Hugo Arès <hugo.ares@ericsson.com> | 2015-05-28 16:07:23 -0400 |
commit | 663ccd76f04017dab216825e9b72a962759ba2e4 (patch) | |
tree | be6f6ea8a7ffab9d368bc709be7f7e9e177084ec | |
parent | a3468f87cb571d7c1b71fc682631a5fc9d38bdf6 (diff) | |
download | jgit-663ccd76f04017dab216825e9b72a962759ba2e4.tar.gz jgit-663ccd76f04017dab216825e9b72a962759ba2e4.zip |
Close WindowCursor using try-with-resources in UnpackedObject
Change-Id: I187403ed432f7d6b1e84223918bd72d895e6bdfe
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java index cb7d912593..e4cc697962 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java @@ -91,11 +91,8 @@ public class UnpackedObject { */ public static ObjectLoader parse(byte[] raw, AnyObjectId id) throws IOException { - WindowCursor wc = new WindowCursor(null); - try { + try (WindowCursor wc = new WindowCursor(null)) { return open(new ByteArrayInputStream(raw), null, id, wc); - } finally { - wc.close(); } } |