aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-05-30 02:07:25 +0200
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-05-30 22:08:49 +0200
commit4e1454ded6e2fcf6cb789c004756883c3ea5f77e (patch)
tree413bd8a7185dd31c6bcd942099091b3d2222d02e /org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
parent629e7cd926779871e9c0d6306e4c184ac67da864 (diff)
downloadjgit-4e1454ded6e2fcf6cb789c004756883c3ea5f77e.tar.gz
jgit-4e1454ded6e2fcf6cb789c004756883c3ea5f77e.zip
Git API does not declare GitAPIException call() and related cleanups
All commands should throw a GitAPIException so new exceptions can be added without breaking the builds of old code, i.e. anyone that calls a Git API should catch GitAPIException and not just the currently known exceptions. Now the only checked exceptions on Git API calls are GitException and subclasses of it. New checked exceptions that are subclasses of GitException may be added without breaking the API. Javadoc for GitAPIException is declared on GitCommand and inherited to subclasses. JGitInternalException is not explicitly documented anymore. Unfortunately this change itself breaks the API. The intention is that it shall be possible to add new checked subclasses of GitAPIException without breaking the API. Bug: 366914 EGit-Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5 Change-Id: I50380f13fc82c22d0036f47c7859cc3a77e767c5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index 05743e6c21..c5a9552112 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -54,6 +54,7 @@ import java.util.Map;
import org.eclipse.jgit.api.MergeResult.MergeStatus;
import org.eclipse.jgit.api.errors.CheckoutConflictException;
import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.InvalidMergeHeadsException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoHeadException;
@@ -109,7 +110,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
*
* @return the result of the merge
*/
- public MergeResult call() throws NoHeadException,
+ public MergeResult call() throws GitAPIException, NoHeadException,
ConcurrentRefUpdateException, CheckoutConflictException,
InvalidMergeHeadsException, WrongRepositoryStateException, NoMessageException {
checkCallable();