mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
Add comment from previous commit
This commit is contained in:
@@ -4,6 +4,13 @@ import com.google.inject.servlet.RequestScoped;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds an instance of {@link HgContext} in the request scope.
|
* Holds an instance of {@link HgContext} in the request scope.
|
||||||
|
*
|
||||||
|
* <p>The problem seems to be that guice had multiple options for injecting HgContext. {@link HgContextProvider}
|
||||||
|
* bound via Module and {@link HgContext} bound void {@link RequestScoped} annotation. It looks like that Guice 4
|
||||||
|
* injects randomly the one or the other, in SCMv1 (Guice 3) everything works as expected.</p>
|
||||||
|
*
|
||||||
|
* <p>To fix the problem we have created this class annotated with {@link RequestScoped}, which holds an instance
|
||||||
|
* of {@link HgContext}. This way only the {@link HgContextProvider} is used for injection.</p>
|
||||||
*/
|
*/
|
||||||
@RequestScoped
|
@RequestScoped
|
||||||
public class HgContextRequestStore {
|
public class HgContextRequestStore {
|
||||||
|
|||||||
Reference in New Issue
Block a user