added some javadoc

This commit is contained in:
Sebastian Sdorra
2019-02-13 12:42:07 +01:00
parent 352bfe7f5a
commit 49e9671fa7
2 changed files with 7 additions and 1 deletions

View File

@@ -42,6 +42,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* Injection provider for {@link HgContext}.
* This provider returns an instance {@link HgContext} from request scope, if no {@link HgContext} could be found in
* request scope (mostly because the scope is not available) a new {@link HgContext} gets returned.
* *
* @author Sebastian Sdorra * @author Sebastian Sdorra
*/ */

View File

@@ -2,10 +2,13 @@ package sonia.scm.repository;
import com.google.inject.servlet.RequestScoped; import com.google.inject.servlet.RequestScoped;
/**
* Holds an instance of {@link HgContext} in the request scope.
*/
@RequestScoped @RequestScoped
public class HgContextRequestStore { public class HgContextRequestStore {
private HgContext context = new HgContext(); private final HgContext context = new HgContext();
public HgContext get() { public HgContext get() {
return context; return context;