You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/02/14 15:16:00 UTC

[jira] [Created] (OAK-9695) Deleting a property fails in case there is a residual protected property definition in its node type

Konrad Windszus created OAK-9695:
------------------------------------

             Summary: Deleting a property fails in case there is a residual protected property definition in its node type
                 Key: OAK-9695
                 URL: https://issues.apache.org/jira/browse/OAK-9695
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: jcr
    Affects Versions: 1.42.0
            Reporter: Konrad Windszus


Given that I have defined a node type 

{code}
[my:Folder] > nt:hierarchyNode
  - * (boolean) protected
  - * (string)
{code}

and I have created a node with some string properties, I can no longer remove those properties. 

It fails with 
{code}
javax.jcr.nodetype.ConstraintViolationException: Item is protected.
	at org.apache.jackrabbit.oak.jcr.session.ItemImpl$ItemWriteOperation.checkPreconditions(ItemImpl.java:98)
	at org.apache.jackrabbit.oak.jcr.session.PropertyImpl$4.checkPreconditions(PropertyImpl.java:116)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:649)
	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:272)
	at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.remove(PropertyImpl.java:113)
{code}

This is due to the missing type check in https://github.com/apache/jackrabbit-oak/blob/24b5ea76758a7fd2bf6cf4598d2aaabe87250fb7/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java#L218.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)