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:
Derek Hulley
2006-12-19 16:15:44 +00:00
parent ced83b971b
commit 58ee1796a2
9 changed files with 139 additions and 80 deletions

View File

@@ -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)