mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4421 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4462 . svn resolved root\projects\repository\source\java\org\alfresco\repo\model\filefolder\FileFolderPerformanceTester.java svn revert root\projects\repository\config\alfresco\version.properties svn resolved root\projects\3rd-party\.classpath git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4661 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -52,6 +52,22 @@ public class InvalidNameEndingPatch extends AbstractPatch
|
||||
private SessionFactory sessionFactory;
|
||||
private NodeDaoService nodeDaoService;
|
||||
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
String name = "fred. ... ";
|
||||
|
||||
int i = (name.length() == 0) ? 0 : name.length() - 1;
|
||||
while (i >= 0 && (name.charAt(i) == '.' || name.charAt(i) == ' '))
|
||||
{
|
||||
i--;
|
||||
}
|
||||
|
||||
String updatedName = (i == 0) ? "unnamed" : name.substring(0, i + 1);
|
||||
System.out.println(updatedName);
|
||||
}
|
||||
|
||||
|
||||
public InvalidNameEndingPatch()
|
||||
{
|
||||
}
|
||||
@@ -149,7 +165,7 @@ public class InvalidNameEndingPatch extends AbstractPatch
|
||||
i--;
|
||||
}
|
||||
|
||||
String updatedName = name.substring(0, i);
|
||||
String updatedName = (i == 0) ? "unnamed" : name.substring(0, i + 1);
|
||||
int idx = 0;
|
||||
boolean applied = false;
|
||||
while (!applied)
|
||||
|
Reference in New Issue
Block a user