SAIL-239 (SAIL-294) - optimise AVM removeLocks into single delete - persist lower-case path

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20774 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2010-06-23 13:13:37 +00:00
parent 9e403f1447
commit 86676eee13

View File

@@ -504,13 +504,18 @@ public class AVMLockingServiceImpl implements AVMLockingService
} }
/** /**
* Utility to get relative paths into canonical form. * Utility to get relative paths into canonical lock form
*
* - remove first forward slash
* - multiple forward slashes collapsed into single foward slash
* *
* @param path The incoming path. * @param path The incoming path.
* @return The normalized path. * @return The normalized path.
*/ */
public static String normalizePath(String path) public static String normalizePath(String path)
{ {
path = path.toLowerCase(); // note: enables optimised removal of locks (based on path dir start)
while (path.startsWith("/")) while (path.startsWith("/"))
{ {
path = path.substring(1); path = path.substring(1);