From ed19912f080157c836fac708c6c77c5f74501a97 Mon Sep 17 00:00:00 2001 From: Martin Spielmann Date: Thu, 28 Jul 2016 17:31:56 +0200 Subject: [PATCH] fix GiBlitWebApp (mostly...) --- .../java/com/gitblit/wicket/GitBlitWebApp.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/GitBlitWebApp.java b/src/main/java/com/gitblit/wicket/GitBlitWebApp.java index c10d8873..15046bc1 100644 --- a/src/main/java/com/gitblit/wicket/GitBlitWebApp.java +++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.java @@ -22,12 +22,14 @@ import java.util.Map; import java.util.TimeZone; import org.apache.wicket.Application; -import org.apache.wicket.Request; -import org.apache.wicket.Response; +import org.apache.wicket.RuntimeConfigurationType; import org.apache.wicket.Session; import org.apache.wicket.application.IClassResolver; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.protocol.http.WebApplication; +import org.apache.wicket.request.Request; +import org.apache.wicket.request.Response; +import org.apache.wicket.util.time.Duration; import ro.fortsoft.pf4j.PluginState; import ro.fortsoft.pf4j.PluginWrapper; @@ -191,7 +193,7 @@ public class GitBlitWebApp extends WebApplication implements GitblitWicketApp { // configure the resource cache duration to 90 days for deployment if (!isDebugMode()) { - getResourceSettings().setDefaultCacheDuration(90 * 86400); + getResourceSettings().setDefaultCacheDuration(Duration.days(90)); } // setup the standard gitweb-ish urls @@ -477,11 +479,11 @@ public class GitBlitWebApp extends WebApplication implements GitblitWicketApp { } @Override - public final String getConfigurationType() { + public final RuntimeConfigurationType getConfigurationType() { if (runtimeManager.isDebugMode()) { - return Application.DEVELOPMENT; + return RuntimeConfigurationType.DEVELOPMENT; } - return Application.DEPLOYMENT; + return RuntimeConfigurationType.DEPLOYMENT; } public static GitBlitWebApp get() { -- 2.39.5