diff options
author | Matthias Sohn | 2015-05-20 22:02:52 +0000 |
---|---|---|
committer | Matthias Sohn | 2015-05-21 08:22:23 +0000 |
commit | 8b8c71f2cfbe2a44aa4e617d7b1ded714905aab3 (patch) | |
tree | a70bab1c79d1c86c6e0a11c86428a7dba3835a6b /org.eclipse.egit.core/src/org/eclipse/egit/core/op | |
parent | af9f7d03e94e2dc813226c4df4cae73b97053c72 (diff) | |
download | egit-8b8c71f2cfbe2a44aa4e617d7b1ded714905aab3.tar.gz egit-8b8c71f2cfbe2a44aa4e617d7b1ded714905aab3.tar.xz egit-8b8c71f2cfbe2a44aa4e617d7b1ded714905aab3.zip |
Replace calls to release() methods with try-with-resource
JGit deleted the deprecated release() methods in change
I2c67384309c5c2e8511a7d0d4e088b4e95f819ff
Change-Id: I1a166ba477543669824888296b3533dd9b0ef3be
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core/op')
-rw-r--r-- | org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java index ac941383c2..9316373f3a 100644 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java +++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/TagOperation.java @@ -94,12 +94,9 @@ public class TagOperation implements IEGitOperation { try { ObjectId tagId; repo.open(startPointRef); - ObjectInserter inserter = repo.newObjectInserter(); - try { + try (ObjectInserter inserter = repo.newObjectInserter()) { tagId = inserter.insert(tag); inserter.flush(); - } finally { - inserter.release(); } return tagId; } catch (IOException e) { |