Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

61350: Merged V4.2-BUG-FIX (4.2.2) to HEAD-BUG-FIX (Cloud/4.3)
      61114: Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.2)
         61011: Merged DEV to V4.1-BUG-FIX (4.1.8)
            60967: MNT-10610: FilenameFilteringInterceptor.java readability
            MNT-10561 : If a folder is renamed with 8 characters that are within A-F and 0-9, the sys:temporary aspect is applied to it
            Implemented a JUnit test to simulate the issue.
            Added a check for a node to be without content in FilenameFilteringInterceptor.isNameOfTmporaryObject(String, NodeRef).
            Fixed code and JavaDoc formatting.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@62410 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-02-12 15:10:29 +00:00
parent 4faaf92018
commit 2a9600f26c
2 changed files with 181 additions and 147 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2012 Alfresco Software Limited.
* Copyright (C) 2005-2014 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -414,6 +414,24 @@ public class FileFolderServiceImplTest extends TestCase
assertNotNull("Folder info for new name is not present", checkInfo);
}
/**
* Test for MNT-10561. Renames a folder to a name with the pattern "^[0-9,a-f]{8}$"
*/
public void testRenamePattern() throws Exception
{
FileInfo folderInfo = getByName(NAME_L0_FOLDER_A, true);
assertNotNull(folderInfo);
// rename normal
String newName = "abcd1234";
folderInfo = fileFolderService.rename(folderInfo.getNodeRef(), newName);
// check it
FileInfo checkInfo = getByName(NAME_L0_FOLDER_A, true);
assertNull("Folder info should have been renamed away", checkInfo);
checkInfo = getByName(newName, true);
assertNotNull("Folder info for new name is not present", checkInfo);
assertFalse(nodeService.getAspects(checkInfo.getNodeRef()).contains(ContentModel.ASPECT_TEMPORARY));
}
public void testRenameWithoutAssocQNameChange() throws Exception
{
FileInfo folderInfo = getByName(NAME_L0_FOLDER_A, true);