From 8aabdf8be30070982cc22ebaf844bff2cab0573f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 13 Jun 2018 20:50:05 +0100 Subject: [PATCH] Rename GitDBLocal as LocalGitDB --- src/main/java/net/kemitix/gitdb/GitDB.java | 4 ++-- .../net/kemitix/gitdb/{GitDBLocal.java => LocalGitDB.java} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/net/kemitix/gitdb/{GitDBLocal.java => LocalGitDB.java} (97%) diff --git a/src/main/java/net/kemitix/gitdb/GitDB.java b/src/main/java/net/kemitix/gitdb/GitDB.java index 4511917..32028ea 100644 --- a/src/main/java/net/kemitix/gitdb/GitDB.java +++ b/src/main/java/net/kemitix/gitdb/GitDB.java @@ -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); } diff --git a/src/main/java/net/kemitix/gitdb/GitDBLocal.java b/src/main/java/net/kemitix/gitdb/LocalGitDB.java similarity index 97% rename from src/main/java/net/kemitix/gitdb/GitDBLocal.java rename to src/main/java/net/kemitix/gitdb/LocalGitDB.java index cf48288..37d8fde 100644 --- a/src/main/java/net/kemitix/gitdb/GitDBLocal.java +++ b/src/main/java/net/kemitix/gitdb/LocalGitDB.java @@ -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);