浏览代码

Fix misspelled class name: EmtpyCommitException -> EmptyCommitException

Change-Id: I55196020146f26951988988c14ac9a6f85061ae2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
tags/v5.0.0.201805151920-m7
David Pursehouse 6 年前
父节点
当前提交
9441508682

+ 3
- 3
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
}


+ 2
- 2
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);
}
}

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);
}
}

正在加载...
取消
保存