core
core copied to clipboard
ESContentletAPIImpl :: deleteUnrelatedContents seems to do something unnecessary
In the ESContentletAPIImpl :: deleteUnrelatedContents method we have this code
if (!contentSelected) {
if (related.isHasParent()) {
tree = TreeFactory.getTree(contentlet.getIdentifier(), relatedContent.getIdentifier(), related.getRelationship().getRelationTypeValue());
} else {
tree = TreeFactory.getTree(relatedContent.getIdentifier(), contentlet.getIdentifier(), related.getRelationship().getRelationTypeValue());
}
Tree treeToDelete = TreeFactory.getTree(tree);
TreeFactory.deleteTree(tree);
}
treeToDelete is not used anywhere on the code. not sure if we should be deleting tree or treeToDelete?
i think treeToDelete is just not needed right?
We need to be careful here - we might need it to refresh the hibernate session before we delete it.
look at this in 3.0
This issue has been automatically marked as stale because it has not had activity within the past 90 days. It will be closed in 30 days no further activity occurs. Thank you.