aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java
index e59b7c18d3..7e3dea6714 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/NameConflictTreeWalkTest.java
@@ -43,15 +43,13 @@
package org.eclipse.jgit.treewalk;
-import java.io.ByteArrayInputStream;
-
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheBuilder;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.dircache.DirCacheIterator;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.FileMode;
-import org.eclipse.jgit.lib.ObjectWriter;
+import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.RepositoryTestCase;
public class NameConflictTreeWalkTest extends RepositoryTestCase {
@@ -248,11 +246,10 @@ public class NameConflictTreeWalkTest extends RepositoryTestCase {
private DirCacheEntry makeEntry(final String path, final FileMode mode)
throws Exception {
- final byte[] pathBytes = Constants.encode(path);
final DirCacheEntry ent = new DirCacheEntry(path);
ent.setFileMode(mode);
- ent.setObjectId(new ObjectWriter(db).computeBlobSha1(pathBytes.length,
- new ByteArrayInputStream(pathBytes)));
+ ent.setObjectId(new ObjectInserter.Formatter().idFor(
+ Constants.OBJ_BLOB, Constants.encode(path)));
return ent;
}