Rename GitDBLocal as LocalGitDB

This commit is contained in:
Paul Campbell 2018-06-13 20:50:05 +01:00
parent 837032b205
commit 8aabdf8be3
2 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ public interface GitDB {
final String userName,
final String userEmailAddress
) throws IOException {
return GitDBLocal.init(dbDir, userName, userEmailAddress);
return LocalGitDB.init(dbDir, userName, userEmailAddress);
}
/**
@ -58,7 +58,7 @@ public interface GitDB {
* @return a GitDB instance for the local gitdb
*/
static GitDB openLocal(final Path dbDir, final String userName, final String userEmailAddress) {
return GitDBLocal.open(dbDir, userName, userEmailAddress);
return LocalGitDB.open(dbDir, userName, userEmailAddress);
}

View file

@ -35,7 +35,7 @@ import java.util.Optional;
* @author Paul Campbell (pcampbell@kemitix.net)
*/
@RequiredArgsConstructor
class GitDBLocal implements GitDB {
class LocalGitDB implements GitDB {
private static final String NOT_A_BARE_REPO = "Not a bare repo";
private static final String ERROR_OPENING_REPOSITORY = "Error opening repository";
@ -61,7 +61,7 @@ class GitDBLocal implements GitDB {
return Optional.of(Git.open(dbDir.toFile()))
.map(Git::getRepository)
.filter(Repository::isBare)
.map(repository -> new GitDBLocal(repository, userName, userEmailAddress))
.map(repository -> new LocalGitDB(repository, userName, userEmailAddress))
.orElseThrow(() -> new InvalidRepositoryException(NOT_A_BARE_REPO, dbDir));
} catch (IOException e) {
throw new InvalidRepositoryException(ERROR_OPENING_REPOSITORY, dbDir, e);