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.List;
import java.util.TimeZone; 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.api.errors.WrongRepositoryStateException;
import org.eclipse.jgit.diff.DiffEntry; import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCache;
@ -553,8 +553,8 @@ public class CommitCommandTest extends RepositoryTestCase {
git.commit().setAuthor("New Author", "newauthor@example.org") git.commit().setAuthor("New Author", "newauthor@example.org")
.setMessage("again no change").setAllowEmpty(false) .setMessage("again no change").setAllowEmpty(false)
.call(); .call();
fail("Didn't get the expected EmtpyCommitException"); fail("Didn't get the expected EmptyCommitException");
} catch (EmtpyCommitException e) { } catch (EmptyCommitException e) {
// expect this exception // 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.AbortedByHookException;
import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException; 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.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoFilepatternException; import org.eclipse.jgit.api.errors.NoFilepatternException;
@ -238,7 +238,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
RevCommit headCommit = rw.parseCommit(headId); RevCommit headCommit = rw.parseCommit(headId);
headCommit.getTree(); headCommit.getTree();
if (indexTreeId.equals(headCommit.getTree())) { if (indexTreeId.equals(headCommit.getTree())) {
throw new EmtpyCommitException( throw new EmptyCommitException(
JGitText.get().emptyCommit); 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 * 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; private static final long serialVersionUID = 1L;
/** /**
* Constructor for EmtpyCommitException * Constructor for EmptyCommitException
* *
* @param message * @param message
* error message * error message
* @param cause * @param cause
* a {@link java.lang.Throwable} * a {@link java.lang.Throwable}
*/ */
public EmtpyCommitException(String message, Throwable cause) { public EmptyCommitException(String message, Throwable cause) {
super(message, cause); super(message, cause);
} }
/** /**
* Constructor for EmtpyCommitException. * Constructor for EmptyCommitException.
* *
* @param message * @param message
* error message * error message
*/ */
public EmtpyCommitException(String message) { public EmptyCommitException(String message) {
super(message); super(message);
} }
} }
Loading…
Cancel
Save