jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Overby <grant.ove...@gmail.com>
Subject jcr2sp - Exception when Deleting Parent of Deleted but unsaved Child
Date Fri, 02 Aug 2013 18:45:55 GMT
javax.jcr.RepositoryException: Cannot transiently remove an ItemState with
status EXISTING_REMOVED
        at
org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.transientRemove(HierarchyEntryImpl.java:414)
        at
org.apache.jackrabbit.jcr2spi.hierarchy.PropertyEntryImpl.transientRemove(PropertyEntryImpl.java:35)
        at
org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.transientRemove(NodeEntryImpl.java:220)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.removeItemState(SessionItemStateManager.java:489)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.visit(SessionItemStateManager.java:302)
        at
org.apache.jackrabbit.jcr2spi.operation.Remove.accept(Remove.java:67)
        at
org.apache.jackrabbit.jcr2spi.state.SessionItemStateManager.execute(SessionItemStateManager.java:215)
        at org.apache.jackrabbit.jcr2spi.ItemImpl.remove(ItemImpl.java:307)


HierarchyEntryImpl.transientRemove() sets the ItemState status to
EXISTING_REMOVED. If the ItemState status is already in EXISTING_REMOVED,
can a no-operation safely occur?

I propose adding the following case to the switch statement in
HierarchyEntryImpl.transientRemove()

case Status.EXISTING_REMOVED: break;

Mime
View raw message