|
|
@@ -113,15 +113,16 @@ public class PathSuffixFilterTest extends RepositoryTestCase { |
|
|
|
|
|
|
|
private List<String> getMatchingPaths(String suffixFilter, |
|
|
|
final ObjectId treeId, boolean recursiveWalk) throws IOException { |
|
|
|
final TreeWalk tw = new TreeWalk(db); |
|
|
|
tw.setFilter(PathSuffixFilter.create(suffixFilter)); |
|
|
|
tw.setRecursive(recursiveWalk); |
|
|
|
tw.addTree(treeId); |
|
|
|
|
|
|
|
List<String> paths = new ArrayList<String>(); |
|
|
|
while (tw.next()) |
|
|
|
paths.add(tw.getPathString()); |
|
|
|
return paths; |
|
|
|
try (final TreeWalk tw = new TreeWalk(db)) { |
|
|
|
tw.setFilter(PathSuffixFilter.create(suffixFilter)); |
|
|
|
tw.setRecursive(recursiveWalk); |
|
|
|
tw.addTree(treeId); |
|
|
|
|
|
|
|
List<String> paths = new ArrayList<String>(); |
|
|
|
while (tw.next()) |
|
|
|
paths.add(tw.getPathString()); |
|
|
|
return paths; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |