Browse Source

Remove a bit of repetition and casting in PackFileTest

PackFileTest lives in o.e.j.internal.storage.file, so I think it's OK for
it to acknowledge the existence of FileRepository in order to avoid some
unnecessary casting, and probably nicer to avoid the repetition too.

Change-Id: I0de592a32f6178e6d6bf114848101e185b3111a1
Signed-off-by: Roberto Tyley <roberto.tyley@gmail.com>
stable-3.5
Roberto Tyley 11 years ago
parent
commit
568df19845
  1. 11
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java

11
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java

@ -95,7 +95,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
private TestRng rng;
private Repository repo;
private FileRepository repo;
private TestRepository<Repository> tr;
@ -274,12 +274,9 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
deflate(pack, delta);
byte[] footer = digest(pack);
File packName = new File(new File(
((FileObjectDatabase) repo.getObjectDatabase()).getDirectory(),
"pack"), idA.name() + ".pack");
File idxName = new File(new File(
((FileObjectDatabase) repo.getObjectDatabase()).getDirectory(),
"pack"), idA.name() + ".idx");
File dir = new File(repo.getObjectDatabase().getDirectory(), "pack");
File packName = new File(dir, idA.name() + ".pack");
File idxName = new File(dir, idA.name() + ".idx");
FileOutputStream f = new FileOutputStream(packName);
try {

Loading…
Cancel
Save