Parameters are final
This commit is contained in:
parent
436a3e2501
commit
a9a6eeb01e
2 changed files with 6 additions and 6 deletions
|
@ -81,29 +81,29 @@ class GitTreeReader {
|
|||
});
|
||||
}
|
||||
|
||||
private NamedRevBlob namedRevBlob(TreeWalk treeWalk, RevWalk revWalk) {
|
||||
private NamedRevBlob namedRevBlob(final TreeWalk treeWalk, final RevWalk revWalk) {
|
||||
return new NamedRevBlob(
|
||||
treeWalk.getNameString(),
|
||||
revWalk.lookupBlob(treeWalk.getObjectId(0)),
|
||||
repository);
|
||||
}
|
||||
|
||||
private Consumer<Void> setTreeFilter(TreeWalk treeWalk) {
|
||||
private Consumer<Void> setTreeFilter(final TreeWalk treeWalk) {
|
||||
return x -> Optional.ofNullable(treeFilter).ifPresent(treeWalk::setFilter);
|
||||
}
|
||||
|
||||
private Consumer<Void> disableRecursion(TreeWalk treeWalk) {
|
||||
private Consumer<Void> disableRecursion(final TreeWalk treeWalk) {
|
||||
return x -> treeWalk.setRecursive(false);
|
||||
}
|
||||
|
||||
private Function<RevTree, Result<Void>> addTreeTo(TreeWalk treeWalk) {
|
||||
private Function<RevTree, Result<Void>> addTreeTo(final TreeWalk treeWalk) {
|
||||
return tree -> Result.of(() -> {
|
||||
treeWalk.addTree(tree);
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
private Callable<RevCommit> parseBranchCommit(Ref branchRef, RevWalk revWalk) {
|
||||
private Callable<RevCommit> parseBranchCommit(final Ref branchRef, final RevWalk revWalk) {
|
||||
return () -> revWalk.parseCommit(branchRef.getObjectId());
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ final class LocalGitDBImpl implements GitDB, LocalGitDB {
|
|||
.map(toLocalGitDB(userName, userEmailAddress));
|
||||
}
|
||||
|
||||
private static Result<Git> gitOpen(Path dbDir) {
|
||||
private static Result<Git> gitOpen(final Path dbDir) {
|
||||
try {
|
||||
return Result.ok(Git.open(dbDir.toFile()));
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in a new issue