]> source.dussan.org Git - jgit.git/commitdiff
Fix unused throws CorruptObjectException from addTree 99/64899/1
authorShawn Pearce <spearce@spearce.org>
Thu, 21 Jan 2016 06:08:23 +0000 (22:08 -0800)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 21 Jan 2016 16:07:50 +0000 (17:07 +0100)
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

org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributesNodeWorkingTreeIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreNodeTest.java

index 6ad19a2491c3f8234c18ecd8304b7531c5490172..4215ba23e58f6c2b70454d5d38b3403687e7a291 100644 (file)
@@ -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;
index 5893d8c4077f630fe5853f1c5bbb1d1af6b6b6f3..c026efcde37fda109bb371171c0ff0578087dbbd 100644 (file)
@@ -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));
        }