summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2016-01-20 22:08:23 -0800
committerMatthias Sohn <matthias.sohn@sap.com>2016-01-21 17:07:50 +0100
commitc221bd6c15887ad97e4c32bf213a6de69ecaaf53 (patch)
treea033f0f86aec39a9fb710eecea191170183fedb9
parent4ec84fac86c9652847630efc2dda3e69954fdb61 (diff)
downloadjgit-c221bd6c15887ad97e4c32bf213a6de69ecaaf53.tar.gz
jgit-c221bd6c15887ad97e4c32bf213a6de69ecaaf53.zip
Fix unused throws CorruptObjectException from addTree
2262a794b48ea removed throws CorruptObjectException, but was not compiled under Eclipse and did not see errors generated by Eclipse. Maven build silently ignored the unnecessary code. Change-Id: I6e9014adcc604588e10e5963d13d0c6ef0e1c617
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java3
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java
index 6ad19a2491..4215ba23e5 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java
@@ -56,7 +56,6 @@ import java.util.Collections;
import java.util.List;
import org.eclipse.jgit.attributes.Attribute.State;
-import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.FileMode;
@@ -253,7 +252,7 @@ public class AttributesNodeWorkingTreeIteratorTest extends RepositoryTestCase {
writeTrashFile(name, data.toString());
}
- private TreeWalk beginWalk() throws CorruptObjectException {
+ private TreeWalk beginWalk() {
TreeWalk newWalk = new TreeWalk(db);
newWalk.addTree(new FileTreeIterator(db));
return newWalk;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java
index 5893d8c407..c026efcde3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java
@@ -55,7 +55,6 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
-import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.ignore.IgnoreNode.MatchResult;
import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.FileMode;
@@ -509,7 +508,7 @@ public class IgnoreNodeTest extends RepositoryTestCase {
.toString());
}
- private void beginWalk() throws CorruptObjectException {
+ private void beginWalk() {
walk = new TreeWalk(db);
walk.addTree(new FileTreeIterator(db));
}