Add comment from previous commit

This commit is contained in:
René Pfeuffer
2019-02-14 11:22:58 +01:00
parent 49e9671fa7
commit 5a5cafaee0

View File

@@ -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 {