Fix misspelled class name: EmtpyCommitException -> EmptyCommitException

Change-Id: I55196020146f26951988988c14ac9a6f85061ae2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2017-12-19 11:13:48 +09:00 committed by Matthias Sohn
parent cc19f64966
commit 9441508682
3 changed files with 11 additions and 11 deletions

View File

@ -54,7 +54,7 @@
import java.util.List;
import java.util.TimeZone;
import org.eclipse.jgit.api.errors.EmtpyCommitException;
import org.eclipse.jgit.api.errors.EmptyCommitException;
import org.eclipse.jgit.api.errors.WrongRepositoryStateException;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.dircache.DirCache;
@ -553,8 +553,8 @@ public void commitEmptyCommits() throws Exception {
git.commit().setAuthor("New Author", "newauthor@example.org")
.setMessage("again no change").setAllowEmpty(false)
.call();
fail("Didn't get the expected EmtpyCommitException");
} catch (EmtpyCommitException e) {
fail("Didn't get the expected EmptyCommitException");
} catch (EmptyCommitException e) {
// expect this exception
}

View File

@ -54,7 +54,7 @@
import org.eclipse.jgit.api.errors.AbortedByHookException;
import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
import org.eclipse.jgit.api.errors.EmtpyCommitException;
import org.eclipse.jgit.api.errors.EmptyCommitException;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoFilepatternException;
@ -238,7 +238,7 @@ public RevCommit call() throws GitAPIException, NoHeadException,
RevCommit headCommit = rw.parseCommit(headId);
headCommit.getTree();
if (indexTreeId.equals(headCommit.getTree())) {
throw new EmtpyCommitException(
throw new EmptyCommitException(
JGitText.get().emptyCommit);
}
}

View File

@ -40,30 +40,30 @@
/**
* Exception thrown when a newly created commit does not contain any changes
*
* @since 4.2
* @since 5.0
*/
public class EmtpyCommitException extends GitAPIException { // TODO: Correct spelling of this class name in 5.0
public class EmptyCommitException extends GitAPIException {
private static final long serialVersionUID = 1L;
/**
* Constructor for EmtpyCommitException
* Constructor for EmptyCommitException
*
* @param message
* error message
* @param cause
* a {@link java.lang.Throwable}
*/
public EmtpyCommitException(String message, Throwable cause) {
public EmptyCommitException(String message, Throwable cause) {
super(message, cause);
}
/**
* Constructor for EmtpyCommitException.
* Constructor for EmptyCommitException.
*
* @param message
* error message
*/
public EmtpyCommitException(String message) {
public EmptyCommitException(String message) {
super(message);
}
}