From 86676eee131bc49bd7f347203a500c560bc04812 Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Wed, 23 Jun 2010 13:13:37 +0000 Subject: [PATCH] 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 --- .../alfresco/repo/avm/locking/AVMLockingServiceImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/avm/locking/AVMLockingServiceImpl.java b/source/java/org/alfresco/repo/avm/locking/AVMLockingServiceImpl.java index 837cc7aa77..d4d098452f 100644 --- a/source/java/org/alfresco/repo/avm/locking/AVMLockingServiceImpl.java +++ b/source/java/org/alfresco/repo/avm/locking/AVMLockingServiceImpl.java @@ -502,15 +502,20 @@ public class AVMLockingServiceImpl implements AVMLockingService } return false; } - + /** - * 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. * @return The normalized path. */ public static String normalizePath(String path) { + path = path.toLowerCase(); // note: enables optimised removal of locks (based on path dir start) + while (path.startsWith("/")) { path = path.substring(1);