summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-04-17 22:49:55 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-17 23:08:07 -0400
commit8abb728835c9f11b7618204a2ee99320681efaa8 (patch)
treeb9cf8bcaf1d66ef139957046976aaae038ac37b7 /src/main/java/com/gitblit
parent856a13892c850f5ab8f3b5dae664525261f886c6 (diff)
downloadgitblit-8abb728835c9f11b7618204a2ee99320681efaa8.tar.gz
gitblit-8abb728835c9f11b7618204a2ee99320681efaa8.zip
[findbugs] Add null checks to the page parameters in ProjectPage
Diffstat (limited to 'src/main/java/com/gitblit')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/ProjectPage.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/ProjectPage.java b/src/main/java/com/gitblit/wicket/pages/ProjectPage.java
index d2f2fd2f..b92282b4 100644
--- a/src/main/java/com/gitblit/wicket/pages/ProjectPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/ProjectPage.java
@@ -92,7 +92,7 @@ public class ProjectPage extends DashboardPage {
return;
}
- String projectName = WicketUtils.getProjectName(params);
+ String projectName = params == null ? null : WicketUtils.getProjectName(params);
if (StringUtils.isEmpty(projectName)) {
throw new GitblitRedirectException(GitBlitWebApp.get().getHomePage());
}
@@ -134,7 +134,9 @@ public class ProjectPage extends DashboardPage {
// reset the daysback parameter so that we have a complete project
// repository list. the recent activity will be built up by the
// reflog utils.
- params.remove("db");
+ if (params != null) {
+ params.remove("db");
+ }
List<RepositoryModel> repositories = getRepositories(params);
Collections.sort(repositories, new Comparator<RepositoryModel>() {