From 507e3a538408cc641d788fa866f847deeccb027b Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Fri, 4 Sep 2015 16:05:47 +0300 Subject: [PATCH] [git tests] remove unnecessary try-finally --- .../push/GitPushOperationBaseTest.java | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/plugins/git4idea/tests/git4idea/push/GitPushOperationBaseTest.java b/plugins/git4idea/tests/git4idea/push/GitPushOperationBaseTest.java index e16d9cb89590..1e66a549ebdc 100644 --- a/plugins/git4idea/tests/git4idea/push/GitPushOperationBaseTest.java +++ b/plugins/git4idea/tests/git4idea/push/GitPushOperationBaseTest.java @@ -53,32 +53,18 @@ abstract class GitPushOperationBaseTest extends GitPlatformTest { protected void setUp() throws Exception { super.setUp(); - try { - myOutside = IdeaTestFixtureFactory.getFixtureFactory().createTempDirTestFixture(); - myOutside.setUp(); - myExternalPath = myOutside.getTempDirPath(); - myPushSupport = findGitPushSupport(); - } - catch (Exception e) { - super.tearDown(); - throw e; - } + myOutside = IdeaTestFixtureFactory.getFixtureFactory().createTempDirTestFixture(); + myOutside.setUp(); + myExternalPath = myOutside.getTempDirPath(); + myPushSupport = findGitPushSupport(); - try { - GitTestUtil.overrideService(myProject, AbstractVcsHelper.class, MockVcsHelper.class); // todo temporary: to handle merge dialog - } - catch (Exception e) { - tearDown(); - throw e; - } + GitTestUtil.overrideService(myProject, AbstractVcsHelper.class, MockVcsHelper.class); } @Override protected void tearDown() throws Exception { try { - if (myOutside != null) { - myOutside.tearDown(); - } + if (myOutside != null) myOutside.tearDown(); } finally { super.tearDown();