]> source.dussan.org Git - gitblit.git/commitdiff
Restart the response on the empty page if the repository has no commits
authorJames Moger <james.moger@gitblit.com>
Wed, 5 Mar 2014 13:58:50 +0000 (08:58 -0500)
committerJames Moger <james.moger@gitblit.com>
Wed, 5 Mar 2014 13:58:50 +0000 (08:58 -0500)
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java

index 59cbdc893ada43e40e76822fadd3fc18bd656bad..bed9fc3498ed57967acb2d8c2d189ac031676e6a 100644 (file)
@@ -29,6 +29,7 @@ import java.util.Set;
 \r
 import org.apache.wicket.Component;\r
 import org.apache.wicket.PageParameters;\r
+import org.apache.wicket.RestartResponseException;\r
 import org.apache.wicket.behavior.SimpleAttributeModifier;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.form.DropDownChoice;\r
@@ -109,7 +110,7 @@ public abstract class RepositoryPage extends RootPage {
                }\r
 \r
                if (!getRepositoryModel().hasCommits) {\r
-                       setResponsePage(EmptyRepositoryPage.class, params);\r
+                       throw new RestartResponseException(EmptyRepositoryPage.class, params);\r
                }\r
 \r
                if (getRepositoryModel().isCollectingGarbage) {\r