Fixed critical issues (Dodgy - instanceof will always return true) reported in Sonar

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@89714 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-11-01 18:23:30 +00:00
parent 2db964e75c
commit 684ba6a6bd

View File

@@ -557,17 +557,9 @@ public class RelationshipServiceImpl extends RecordsManagementAdminBase implemen
{
type = RelationshipType.PARENTCHILD;
}
else if (associationDefinition instanceof AssociationDefinition)
{
type = RelationshipType.BIDIRECTIONAL;
}
else
{
StringBuilder sb = new StringBuilder();
sb.append("Unsupported association definition: '")
.append(associationDefinition.getName().getLocalName())
.append("'.");
throw new AlfrescoRuntimeException(sb.toString());
type = RelationshipType.BIDIRECTIONAL;
}
return type;