From c828cf2db88956094a31a79741145688876879df Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 23 May 2014 08:17:11 -0400 Subject: Use Guice-Servlet rather than custom code and expose the Injector This is a fairly functional variation of Gitblit with one notable exception: The security filters are not working properly. This is a design flaw in Guice that I have reported upstream [1]. The general idea is that Guice-Servlet filters are not properly wrapping the ServletRequest. This has historically been a problem for Guice-Servlet servlets but Google has fixed most of those issues. Unfortunately, all the same flaws reported against the servlet delegation also exist in Guice-Servlet filter delegation. :( [1]: https://code.google.com/p/google-guice/issues/detail?id=807 --- src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/test/java') diff --git a/src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java b/src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java index 54be539f..36a0218e 100644 --- a/src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java +++ b/src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java @@ -28,6 +28,7 @@ import com.gitblit.manager.IRuntimeManager; import com.gitblit.models.ServerSettings; import com.gitblit.models.ServerStatus; import com.gitblit.models.SettingModel; +import com.google.inject.Injector; public class MockRuntimeManager implements IRuntimeManager { @@ -56,6 +57,11 @@ public class MockRuntimeManager implements IRuntimeManager { this.serverSettings = new ServerSettings(); } + @Override + public Injector getInjector() { + return null; + } + @Override public void setBaseFolder(File folder) { this.baseFolder = folder; -- cgit v1.2.3