[DS-1814] move unbindhandle first, its fix stale exception due to the unbind identifier done after remove version (remove version itself unbind handle many times)

This commit is contained in:
Luigi Andrea Pascarelli
2016-08-20 20:23:55 +02:00
parent c8641e5ed6
commit 2087ec2522

View File

@@ -609,6 +609,9 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
// Remove bundles
removeAllBundles(context, item);
// Remove any Handle
handleService.unbindHandle(context, item);
// remove version attached to the item
removeVersion(context, item);
@@ -624,10 +627,6 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
item.getCollections().clear();
item.setOwningCollection(null);
// Remove any Handle
handleService.unbindHandle(context, item);
// Finally remove item row
itemDAO.delete(context, item);
}