From 41aaf7ac59be75e61b32c33c744ab6ba8e1d530d Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 5 Mar 2014 08:58:50 -0500 Subject: Restart the response on the empty page if the repository has no commits --- src/main/java/com/gitblit/wicket/pages/RepositoryPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/com') diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 59cbdc89..bed9fc34 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -29,6 +29,7 @@ import java.util.Set; import org.apache.wicket.Component; import org.apache.wicket.PageParameters; +import org.apache.wicket.RestartResponseException; import org.apache.wicket.behavior.SimpleAttributeModifier; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.DropDownChoice; @@ -109,7 +110,7 @@ public abstract class RepositoryPage extends RootPage { } if (!getRepositoryModel().hasCommits) { - setResponsePage(EmptyRepositoryPage.class, params); + throw new RestartResponseException(EmptyRepositoryPage.class, params); } if (getRepositoryModel().isCollectingGarbage) { -- cgit v1.2.3