From 99721ac4b79ce17bcd5b8247ac59126860b8efb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Boris=20Pru=CC=88=C3=9Fmann?= Date: Mon, 2 Jan 2012 11:01:10 +0100 Subject: [PATCH] Fixed IndexOutOfBoundsException that occurs when a repository doesn't have commits within the requested time range. --- src/com/gitblit/utils/ActivityUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/gitblit/utils/ActivityUtils.java b/src/com/gitblit/utils/ActivityUtils.java index 204fe3c3..d6afd93c 100644 --- a/src/com/gitblit/utils/ActivityUtils.java +++ b/src/com/gitblit/utils/ActivityUtils.java @@ -85,7 +85,7 @@ public class ActivityUtils { // determine commit branch String branch = objectId; - if (StringUtils.isEmpty(branch)) { + if (StringUtils.isEmpty(branch) && !commits.isEmpty()) { List headRefs = allRefs.get(commits.get(0).getId()); List localBranches = new ArrayList(); for (RefModel ref : headRefs) { -- 2.39.5