Browse Source

Fix misspelled class name: EmtpyCommitException -> EmptyCommitException

Change-Id: I55196020146f26951988988c14ac9a6f85061ae2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.0
David Pursehouse 7 years ago committed by Matthias Sohn
parent
commit
9441508682
  1. 6
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java
  2. 4
      org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
  3. 12
      org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmptyCommitException.java

6
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitCommandTest.java

@ -54,7 +54,7 @@ import java.util.Date;
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 class CommitCommandTest extends RepositoryTestCase {
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
}

4
org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java

@ -54,7 +54,7 @@ import java.util.List;
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 class CommitCommand extends GitCommand<RevCommit> {
RevCommit headCommit = rw.parseCommit(headId);
headCommit.getTree();
if (indexTreeId.equals(headCommit.getTree())) {
throw new EmtpyCommitException(
throw new EmptyCommitException(
JGitText.get().emptyCommit);
}
}

12
org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java → org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmptyCommitException.java

@ -40,30 +40,30 @@ package org.eclipse.jgit.api.errors;
/**
* 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);
}
}
Loading…
Cancel
Save