diff options
author | Boris Prüßmann <boris@pruessmann.org> | 2012-01-02 11:01:10 +0100 |
---|---|---|
committer | Boris Prüßmann <boris@pruessmann.org> | 2012-01-02 11:01:10 +0100 |
commit | 99721ac4b79ce17bcd5b8247ac59126860b8efb5 (patch) | |
tree | 0b6c6561bcbfd613a813a240a8a2bc560373cf64 | |
parent | ff148dd3af7afa81736c0f8600912fa88099a6b9 (diff) | |
download | gitblit-99721ac4b79ce17bcd5b8247ac59126860b8efb5.tar.gz gitblit-99721ac4b79ce17bcd5b8247ac59126860b8efb5.zip |
Fixed IndexOutOfBoundsException that occurs when a repository doesn't
have commits within the requested time range.
-rw-r--r-- | src/com/gitblit/utils/ActivityUtils.java | 2 |
1 files changed, 1 insertions, 1 deletions
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<RefModel> headRefs = allRefs.get(commits.get(0).getId());
List<String> localBranches = new ArrayList<String>();
for (RefModel ref : headRefs) {
|