Skip to content

Commit 396e9bb

Browse files
committed
Fix NPE when there are two repositories which only differ in case
1 parent ede713d commit 396e9bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/gitblit/manager/RepositoryManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ public RepositoryModel getRepositoryModel(String repositoryName) {
702702
// cached model
703703
RepositoryModel model = repositoryListCache.get(repositoryKey);
704704

705-
if (gcExecutor.isCollectingGarbage(model.name)) {
705+
if (isCollectingGarbage(model.name)) {
706706
// Gitblit is busy collecting garbage, use our cached model
707707
RepositoryModel rm = DeepCopier.copy(model);
708708
rm.isCollectingGarbage = true;
@@ -1287,7 +1287,7 @@ private int getConfig(StoredConfig config, String field, int defaultValue) {
12871287
@Override
12881288
public void updateRepositoryModel(String repositoryName, RepositoryModel repository,
12891289
boolean isCreate) throws GitBlitException {
1290-
if (gcExecutor.isCollectingGarbage(repositoryName)) {
1290+
if (isCollectingGarbage(repositoryName)) {
12911291
throw new GitBlitException(MessageFormat.format("sorry, Gitblit is busy collecting garbage in {0}",
12921292
repositoryName));
12931293
}

0 commit comments

Comments
 (0)