diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java index 07dc56003..3fb9288d0 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BranchCommandTest.java @@ -53,7 +53,6 @@ import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.NotMergedException; import org.eclipse.jgit.api.errors.RefAlreadyExistsException; import org.eclipse.jgit.api.errors.RefNotFoundException; -import org.eclipse.jgit.errors.AmbiguousObjectException; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate; @@ -404,7 +403,7 @@ public class BranchCommandTest extends RepositoryTestCase { public Ref createBranch(Git actGit, String name, boolean force, String startPoint, SetupUpstreamMode mode) throws JGitInternalException, RefAlreadyExistsException, - AmbiguousObjectException, RefNotFoundException, + RefNotFoundException, InvalidRefNameException { CreateBranchCommand cmd = actGit.branchCreate(); cmd.setName(name); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java index 4c584c33b..792f0a3ea 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java @@ -114,16 +114,13 @@ public class CreateBranchCommand extends GitCommand { * that already exists * @throws RefNotFoundException * if the start point can not be found - * @throws AmbiguousObjectException - * if the start point is ambiguous * @throws InvalidRefNameException * if the provided name is null or otherwise * invalid * @return the newly created branch */ public Ref call() throws JGitInternalException, RefAlreadyExistsException, - RefNotFoundException, AmbiguousObjectException, - InvalidRefNameException { + RefNotFoundException, InvalidRefNameException { checkCallable(); processOptions(); try { @@ -267,8 +264,6 @@ public class CreateBranchCommand extends GitCommand { config.save(); } return result; - } catch (AmbiguousObjectException e) { - throw e; } catch (IOException ioe) { throw new JGitInternalException(ioe.getMessage(), ioe); }