diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgContextRequestStore.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgContextRequestStore.java index 6043c347ff..ff08c2fcd2 100644 --- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgContextRequestStore.java +++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/HgContextRequestStore.java @@ -4,6 +4,13 @@ import com.google.inject.servlet.RequestScoped; /** * Holds an instance of {@link HgContext} in the request scope. + * + *
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.
+ * + *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.
*/ @RequestScoped public class HgContextRequestStore {