From d49ab99ef5820e511fd3edbd5e96de96b804fad2 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 12 Mar 2015 17:59:46 -0400
Subject: [PATCH] Update Jetty to 9.2.10
---
src/main/java/com/gitblit/manager/RuntimeManager.java | 59 +++++++++++++----------------------------------------------
1 files changed, 13 insertions(+), 46 deletions(-)
diff --git a/src/main/java/com/gitblit/manager/RuntimeManager.java b/src/main/java/com/gitblit/manager/RuntimeManager.java
index 219bf80..18d6b9c 100644
--- a/src/main/java/com/gitblit/manager/RuntimeManager.java
+++ b/src/main/java/com/gitblit/manager/RuntimeManager.java
@@ -33,7 +33,11 @@
import com.gitblit.models.SettingModel;
import com.gitblit.utils.StringUtils;
import com.gitblit.utils.XssFilter;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Singleton;
+@Singleton
public class RuntimeManager implements IRuntimeManager {
private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -50,6 +54,10 @@
private TimeZone timezone;
+ @Inject
+ private Injector injector;
+
+ @Inject
public RuntimeManager(IStoredSettings settings, XssFilter xssFilter) {
this(settings, xssFilter, null);
}
@@ -76,6 +84,11 @@
@Override
public RuntimeManager stop() {
return this;
+ }
+
+ @Override
+ public Injector getInjector() {
+ return injector;
}
@Override
@@ -113,52 +126,6 @@
}
// settingsModel.pushScripts = getAllScripts();
return settingsModel;
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * or if it is merely a repository viewer.
- *
- * @return true if Gitblit is serving repositories
- */
- @Override
- public boolean isServingRepositories() {
- return isServingHTTP()
- || isServingGIT()
- || isServingSSH();
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the HTTP protocol.
- *
- * @return true if Gitblit is serving repositories over the HTTP protocol
- */
- @Override
- public boolean isServingHTTP() {
- return settings.getBoolean(Keys.git.enableGitServlet, true);
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the Git Daemon protocol.
- *
- * @return true if Gitblit is serving repositories over the Git Daemon protocol
- */
- @Override
- public boolean isServingGIT() {
- return settings.getInteger(Keys.git.daemonPort, 0) > 0;
- }
-
- /**
- * Determine if this Gitblit instance is actively serving git repositories
- * over the SSH protocol.
- *
- * @return true if Gitblit is serving repositories over the SSH protocol
- */
- @Override
- public boolean isServingSSH() {
- return settings.getInteger(Keys.git.sshPort, 0) > 0;
}
/**
--
Gitblit v1.9.1