From 8abb728835c9f11b7618204a2ee99320681efaa8 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 17 Apr 2014 22:49:55 -0400 Subject: [PATCH] [findbugs] Add null checks to the page parameters in ProjectPage --- src/main/java/com/gitblit/wicket/pages/ProjectPage.java | 6 ++++-- 1 file 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 repositories = getRepositories(params); Collections.sort(repositories, new Comparator() { -- 2.39.5