mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 01:15:44 +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.
|
||||
*
|
||||
* <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
|
||||
public class HgContextRequestStore {
|
||||
|
||||
Reference in New Issue
Block a user