mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
AssociationRef parsing error due to addition of 'id' in format
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20557 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -77,16 +77,21 @@ public class AssociationRef implements EntityRef, Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* @param childAssocRefStr a string of the form <b>sourceNodeRef|targetNodeRef|assocTypeQName</b>
|
||||
* @param childAssocRefStr a string of the form <b>id|sourceNodeRef|targetNodeRef|assocTypeQName</b>.
|
||||
*/
|
||||
public AssociationRef(String assocRefStr)
|
||||
{
|
||||
StringTokenizer tokenizer = new StringTokenizer(assocRefStr, FILLER);
|
||||
if (tokenizer.countTokens() != 3)
|
||||
if (tokenizer.countTokens() != 3 && tokenizer.countTokens() != 4)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Unable to parse association string: " + assocRefStr);
|
||||
}
|
||||
String idStr = tokenizer.nextToken();
|
||||
|
||||
String idStr = "0";
|
||||
if (tokenizer.countTokens() == 4)
|
||||
{
|
||||
idStr = tokenizer.nextToken();
|
||||
}
|
||||
String sourceNodeRefStr = tokenizer.nextToken();
|
||||
String targetNodeRefStr = tokenizer.nextToken();
|
||||
String assocTypeQNameStr = tokenizer.nextToken();
|
||||
|
Reference in New Issue
Block a user