]> source.dussan.org Git - gitblit.git/commitdiff
[findbugs] Add null checks to the page parameters in ProjectPage
authorJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 02:49:55 +0000 (22:49 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 03:08:07 +0000 (23:08 -0400)
src/main/java/com/gitblit/wicket/pages/ProjectPage.java

index d2f2fd2f49c2a0e627e336a21a95d86bd1b40a77..b92282b415ad427f7da2f081e03a12acc905a2b9 100644 (file)
@@ -92,7 +92,7 @@ public class ProjectPage extends DashboardPage {
                        return;\r
                }\r
 \r
-               String projectName = WicketUtils.getProjectName(params);\r
+               String projectName = params == null ? null : WicketUtils.getProjectName(params);\r
                if (StringUtils.isEmpty(projectName)) {\r
                        throw new GitblitRedirectException(GitBlitWebApp.get().getHomePage());\r
                }\r
@@ -134,7 +134,9 @@ public class ProjectPage extends DashboardPage {
                // reset the daysback parameter so that we have a complete project\r
                // repository list.  the recent activity will be built up by the\r
                // reflog utils.\r
-               params.remove("db");\r
+               if (params != null) {\r
+                       params.remove("db");\r
+               }\r
 \r
                List<RepositoryModel> repositories = getRepositories(params);\r
                Collections.sort(repositories, new Comparator<RepositoryModel>() {\r