diff options
author | James Moger <james.moger@gitblit.com> | 2014-05-23 08:17:11 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-07-03 16:57:47 -0400 |
commit | c828cf2db88956094a31a79741145688876879df (patch) | |
tree | 7f9d7e8b0fe7d91350afb79b2baf60f543712150 /src/test/java | |
parent | aa1361d04cfe09f90e7d8bece90c00dd6e4185bb (diff) | |
download | gitblit-c828cf2db88956094a31a79741145688876879df.tar.gz gitblit-c828cf2db88956094a31a79741145688876879df.zip |
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
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/gitblit/tests/mock/MockRuntimeManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 { @@ -57,6 +58,11 @@ public class MockRuntimeManager implements IRuntimeManager { } @Override + public Injector getInjector() { + return null; + } + + @Override public void setBaseFolder(File folder) { this.baseFolder = folder; } |