Mercurial > jhg
diff src/org/tmatesoft/hg/util/PathPool.java @ 292:a415fe296a50
Refactor PathRewrite to accept any char sequence, not only string
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 14 Sep 2011 02:16:19 +0200 |
parents | 1792b37650f2 |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/util/PathPool.java Wed Sep 14 02:12:47 2011 +0200 +++ b/src/org/tmatesoft/hg/util/PathPool.java Wed Sep 14 02:16:19 2011 +0200 @@ -36,14 +36,14 @@ } public Path path(String p) { - p = pathRewrite.rewrite(p); + p = pathRewrite.rewrite(p).toString(); return get(p, true); } // pipes path object through cache to reuse instance, if possible // TODO unify with Pool<Path> public Path path(Path p) { - String s = pathRewrite.rewrite(p.toString()); + String s = pathRewrite.rewrite(p).toString(); Path cached = get(s, false); if (cached == null) { cache.put(s, new SoftReference<Path>(cached = p));