diff options
author | James Moger <james.moger@gitblit.com> | 2014-02-28 18:00:18 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-01 09:21:32 -0500 |
commit | 01ffd40bd6f2e5a970527862b93b4e611367c746 (patch) | |
tree | c8e56ad59da61526d152d351d44d359bad5bce3f /src | |
parent | 9bb5225b87746b75bbd065bd0ab5af3e48cab0a4 (diff) | |
download | gitblit-01ffd40bd6f2e5a970527862b93b4e611367c746.tar.gz gitblit-01ffd40bd6f2e5a970527862b93b4e611367c746.zip |
Fix potential NPE in creating a date label
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/WicketUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/WicketUtils.java b/src/main/java/com/gitblit/wicket/WicketUtils.java index f1f084c6..bba3f79a 100644 --- a/src/main/java/com/gitblit/wicket/WicketUtils.java +++ b/src/main/java/com/gitblit/wicket/WicketUtils.java @@ -434,7 +434,7 @@ public class WicketUtils { parameterMap.put("pg", String.valueOf(pageNumber));
return new PageParameters(parameterMap);
}
-
+
public static PageParameters newBlameTypeParameter(String repositoryName,
String commitId, String path, String blameType) {
Map<String, String> parameterMap = new HashMap<String, String>();
@@ -536,7 +536,7 @@ public class WicketUtils { // past
title = timeUtils.timeAgo(date);
}
- if ((System.currentTimeMillis() - date.getTime()) < 10 * 24 * 60 * 60 * 1000L) {
+ if (title != null && (System.currentTimeMillis() - date.getTime()) < 10 * 24 * 60 * 60 * 1000L) {
String tmp = dateString;
dateString = title;
title = tmp;
|