Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
Description
When a new asset named ".jpg" is being modified in JCR, ResourceUtil.normalize() method returns an incorrect normalized path which leads to the creation of a folder named '.jp' under the same parent node. A small test shows this anomaly.
public class RUNormalizeTest { public static String toPropertyPath(String paramName, String path) { if (!paramName.startsWith("/")) { paramName = ResourceUtil.normalize(path + '/' + paramName); } return paramName; } public static void main(String[] args) { String pName = "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; String path = "/content/dam"; System.out.println(toPropertyPath(pName,path)); } }
Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title
Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title
In the above code, the properties of an asset named '.jpg' are being modified. However, the normalize method returns an incorrect path for the input path.
Attachments
Issue Links
- links to