summaryrefslogtreecommitdiffstats
path: root/src/main/java/com
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 20:32:05 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:07:56 -0400
commit26cc4ed9fad9796756d34ae0fd3350bd3c139c7a (patch)
treee5cd3a0e997093133273090bf7ff1df2c71a16ca /src/main/java/com
parentb1d77ab9df4334e31db3e016f2a4ac77ea0cddb6 (diff)
downloadgitblit-26cc4ed9fad9796756d34ae0fd3350bd3c139c7a.tar.gz
gitblit-26cc4ed9fad9796756d34ae0fd3350bd3c139c7a.zip
[findbugs] Fix incorrect key lookup in commit cache
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/gitblit/utils/CommitCache.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/utils/CommitCache.java b/src/main/java/com/gitblit/utils/CommitCache.java
index fd3a6597..a3963f50 100644
--- a/src/main/java/com/gitblit/utils/CommitCache.java
+++ b/src/main/java/com/gitblit/utils/CommitCache.java
@@ -225,7 +225,8 @@ public class CommitCache {
List<RepositoryCommit> commits = new ArrayList<RepositoryCommit>();
for (RevCommit commit : JGitUtils.getRevLog(repository, branch, sinceDate)) {
RepositoryCommit commitModel = new RepositoryCommit(repositoryName, branch, commit);
- commitModel.setRefs(allRefs.get(commitModel.getName()));
+ List<RefModel> commitRefs = allRefs.get(commitModel.getId());
+ commitModel.setRefs(commitRefs);
commits.add(commitModel);
}
return commits;
@@ -245,7 +246,8 @@ public class CommitCache {
List<RepositoryCommit> commits = new ArrayList<RepositoryCommit>();
for (RevCommit commit : JGitUtils.getRevLog(repository, sinceCommit.getName(), branch)) {
RepositoryCommit commitModel = new RepositoryCommit(repositoryName, branch, commit);
- commitModel.setRefs(allRefs.get(commitModel.getName()));
+ List<RefModel> commitRefs = allRefs.get(commitModel.getId());
+ commitModel.setRefs(commitRefs);
commits.add(commitModel);
}
return commits;