From c75204c676286b92882f46a6d29103b9a6d32db1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 21 Jul 2018 23:23:02 +0100 Subject: [PATCH] Mon.invert renamed to swap --- src/main/java/net/kemitix/gitdb/impl/GitDBRepo.java | 2 +- src/main/java/net/kemitix/gitdb/impl/LocalGitDBImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/kemitix/gitdb/impl/GitDBRepo.java b/src/main/java/net/kemitix/gitdb/impl/GitDBRepo.java index 20e759e..36841d3 100644 --- a/src/main/java/net/kemitix/gitdb/impl/GitDBRepo.java +++ b/src/main/java/net/kemitix/gitdb/impl/GitDBRepo.java @@ -85,7 +85,7 @@ class GitDBRepo { ) { final GitTreeReader treeFilter = new GitTreeReader(repository).treeFilter(key); return streamTree(branchRef, treeFilter).flatMap(s -> - Result.invert(s.findFirst() + Result.swap(s.findFirst() .map(NamedRevBlob::blobAsString) .map(Maybe::just) .orElseGet(Maybe::nothing))); diff --git a/src/main/java/net/kemitix/gitdb/impl/LocalGitDBImpl.java b/src/main/java/net/kemitix/gitdb/impl/LocalGitDBImpl.java index 6ac5c17..fac9502 100644 --- a/src/main/java/net/kemitix/gitdb/impl/LocalGitDBImpl.java +++ b/src/main/java/net/kemitix/gitdb/impl/LocalGitDBImpl.java @@ -114,7 +114,7 @@ final class LocalGitDBImpl implements GitDB, LocalGitDB { public Result> branch(final String name) { return Result.flatMapMaybe( Result.of(() -> Maybe.maybe(repository.findRef(name))), - refMaybe -> Result.invert(refMaybe.map(branchInit))); + refMaybe -> Result.swap(refMaybe.map(branchInit))); } }