From: Boris Prüßmann Date: Mon, 2 Jan 2012 10:01:10 +0000 (+0100) Subject: Fixed IndexOutOfBoundsException that occurs when a repository doesn't X-Git-Tag: v0.8.0~30^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=99721ac4b79ce17bcd5b8247ac59126860b8efb5;p=gitblit.git Fixed IndexOutOfBoundsException that occurs when a repository doesn't have commits within the requested time range. --- 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) {