]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6895: Trimmed leading '/' character from resource names.
authorremillet <remillet@yahoo.com>
Fri, 5 Feb 2016 05:49:27 +0000 (21:49 -0800)
committerremillet <remillet@yahoo.com>
Fri, 5 Feb 2016 05:49:27 +0000 (21:49 -0800)
services/client/src/main/java/org/collectionspace/services/client/test/AbstractServiceTestImpl.java
services/common/src/main/java/org/collectionspace/services/common/security/SecurityUtils.java

index 8f1d058aba0914ad930985f0694ac7fd1f4903b8..cbce4fa9245fabfed5b95114f434ac11a428f352 100644 (file)
@@ -656,7 +656,7 @@ public abstract class AbstractServiceTestImpl<CLT, CPT, REQUEST_TYPE, RESPONSE_T
             final int OBJECTS_TO_CREATE = 3;
             final String KEYWORD = NON_EXISTENT_KEYWORD + createIdentifier();
             for (int i = 0; i < OBJECTS_TO_CREATE; i++) {
-                this.createWorkflowTarget(testName, KEYWORD);
+                this.createWorkflowTarget(testName, KEYWORD + " " + i);
             }
 
             //
index 80166234037bfbb718de3a408d5a57b3af6f5d85..64ad4e5f516908921a1a0063e67b765c66b6db82 100644 (file)
@@ -164,7 +164,8 @@ public class SecurityUtils {
                        uriPath = uriPath.replace(hjidValue, "*");
                }
                
-               uriPath = uriPath.replace("//", "/");
+               uriPath = uriPath.replace("//", "/"); // replace duplicate '/' characters
+               uriPath = uriPath.startsWith("/") ? uriPath.substring(1) : uriPath; // if present, strip the leading '/' character
                return uriPath;
        }