diff options
author | Robin Rosenberg | 2012-05-30 00:24:18 +0000 |
---|---|---|
committer | Matthias Sohn | 2012-05-30 00:24:18 +0000 |
commit | bda268636a1de7077bd28484a201988883bae1c9 (patch) | |
tree | 7342fbd4f90001ec3de5b98b31c177d0370707f6 /org.eclipse.egit.ui.test | |
parent | 64417af7a7e0d74ee423d6642d40a5116f584fe1 (diff) | |
download | egit-bda268636a1de7077bd28484a201988883bae1c9.tar.gz egit-bda268636a1de7077bd28484a201988883bae1c9.tar.xz egit-bda268636a1de7077bd28484a201988883bae1c9.zip |
Git API does not declare GitAPIException call() and related changes
Anyone that calls a Git API should catch GitAPIException and not just
the currently known exceptions.
During the process of cleaning this up a number of cases, but not all
cases, where only checked exceptions are thrown, are changed to
catch all Exceptions except Error.
This changes adapt EGit to changes made in JGit for this reason.
Bug: 366914
JGit-Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5
Change-Id: I4de4902003a9f306912475e8b15b1e72d43e7475
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui.test')
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java index 13c1129af7..e2c1d4bcc0 100644 --- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java +++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/wizards/share/SharingWizardTest.java @@ -13,6 +13,7 @@ package org.eclipse.egit.ui.wizards.share; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.io.File; import java.io.IOException; @@ -40,12 +41,8 @@ import org.eclipse.egit.ui.common.SharingWizard; import org.eclipse.egit.ui.test.Eclipse; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jgit.api.Git; -import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException; +import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.JGitInternalException; -import org.eclipse.jgit.api.errors.NoFilepatternException; -import org.eclipse.jgit.api.errors.NoHeadException; -import org.eclipse.jgit.api.errors.NoMessageException; -import org.eclipse.jgit.api.errors.WrongRepositoryStateException; import org.eclipse.jgit.junit.MockSystemReader; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; @@ -60,7 +57,6 @@ import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import static org.junit.Assert.*; import org.junit.runner.RunWith; @RunWith(SWTBotJunit4ClassRunner.class) @@ -196,9 +192,7 @@ public class SharingWizardTest extends LocalRepositoryTestCase { @Test public void shareProjectWithAlreadyCreatedRepos() throws IOException, - InterruptedException, NoFilepatternException, NoHeadException, - NoMessageException, ConcurrentRefUpdateException, - JGitInternalException, WrongRepositoryStateException { + InterruptedException, JGitInternalException, GitAPIException { FileRepository repo1 = new FileRepository(new File( createProject(projectName1), "../.git")); repo1.create(); |