Mercurial > jhg
diff src/org/tmatesoft/hg/internal/BasicSessionContext.java @ 431:12f668401613
FIXMEs: awkward API refactored, what need to be internal got hidden; public aspects got captured in slim interfaces
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 29 Mar 2012 20:54:04 +0200 |
parents | 30922c728341 |
children | 909306e412e2 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/BasicSessionContext.java Thu Mar 29 18:48:23 2012 +0200 +++ b/src/org/tmatesoft/hg/internal/BasicSessionContext.java Thu Mar 29 20:54:04 2012 +0200 @@ -21,8 +21,6 @@ import org.tmatesoft.hg.core.SessionContext; import org.tmatesoft.hg.util.LogFacility; -import org.tmatesoft.hg.util.PathPool; -import org.tmatesoft.hg.util.PathRewrite; /** * @@ -31,28 +29,19 @@ */ public class BasicSessionContext implements SessionContext { - private PathPool pathPool; private LogFacility logFacility; private final Map<String, Object> properties; - public BasicSessionContext(PathPool pathFactory, LogFacility log) { - this(null, pathFactory, log); + public BasicSessionContext(LogFacility log) { + this(null, log); } @SuppressWarnings("unchecked") - public BasicSessionContext(Map<String,?> propertyOverrides, PathPool pathFactory, LogFacility log) { - pathPool = pathFactory; + public BasicSessionContext(Map<String,?> propertyOverrides, LogFacility log) { logFacility = log; properties = propertyOverrides == null ? Collections.<String,Object>emptyMap() : (Map<String, Object>) propertyOverrides; } - public PathPool getPathPool() { - if (pathPool == null) { - pathPool = new PathPool(new PathRewrite.Empty()); - } - return pathPool; - } - public LogFacility getLog() { // e.g. for exceptions that we can't handle but log (e.g. FileNotFoundException when we've checked beforehand file.canRead() if (logFacility == null) {