Mercurial > jhg
diff src/org/tmatesoft/hg/internal/RelativePathRewrite.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 | 8248aae33f7d |
children |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/RelativePathRewrite.java Wed Sep 14 02:12:47 2011 +0200 +++ b/src/org/tmatesoft/hg/internal/RelativePathRewrite.java Wed Sep 14 02:16:19 2011 +0200 @@ -37,7 +37,8 @@ this.rootPath = rootPath; } - public String rewrite(String path) { + public CharSequence rewrite(CharSequence p) { + String path = p == null ? null : p.toString(); if (path != null && path.startsWith(rootPath)) { if (path.length() == rootPath.length()) { return "";