You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2009/09/28 18:03:16 UTC
[jira] Created: (JCR-2333) ItemImpl#validateTransientItems:
Incomplete validation of mandatory child item
ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
------------------------------------------------------------------------------
Key: JCR-2333
URL: https://issues.apache.org/jira/browse/JCR-2333
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core
Reporter: angela
Fix For: 2.0.0
ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
existing item really has the mandatory definition.
the example i had:
- mandatory single-value property.
- there is the possibility to add residual props
- added a residual property with the name of the mandatory prop but with multiple values
-> changes are saved without exception.
-> the node doesn't have a property with the mandatory definition.
((without having tried it out, i think the same would be possible with child nodes))
suggested fix:
if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (JCR-2333) ItemImpl#validateTransientItems:
Incomplete validation of mandatory child item
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela reassigned JCR-2333:
---------------------------
Assignee: angela
> ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
> ------------------------------------------------------------------------------
>
> Key: JCR-2333
> URL: https://issues.apache.org/jira/browse/JCR-2333
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: angela
> Assignee: angela
> Fix For: 2.0.0
>
> Attachments: JCR-2333_2.patch, JCR_2333.patch
>
>
> ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
> been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
> existing item really has the mandatory definition.
> the example i had:
> - mandatory single-value property.
> - there is the possibility to add residual props
> - added a residual property with the name of the mandatory prop but with multiple values
> -> changes are saved without exception.
> -> the node doesn't have a property with the mandatory definition.
> ((without having tried it out, i think the same would be possible with child nodes))
> suggested fix:
> if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
> patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-2333) ItemImpl#validateTransientItems:
Incomplete validation of mandatory child item
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela resolved JCR-2333.
-------------------------
Resolution: Fixed
> ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
> ------------------------------------------------------------------------------
>
> Key: JCR-2333
> URL: https://issues.apache.org/jira/browse/JCR-2333
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: angela
> Fix For: 2.0.0
>
> Attachments: JCR-2333_2.patch, JCR_2333.patch
>
>
> ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
> been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
> existing item really has the mandatory definition.
> the example i had:
> - mandatory single-value property.
> - there is the possibility to add residual props
> - added a residual property with the name of the mandatory prop but with multiple values
> -> changes are saved without exception.
> -> the node doesn't have a property with the mandatory definition.
> ((without having tried it out, i think the same would be possible with child nodes))
> suggested fix:
> if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
> patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2333) ItemImpl#validateTransientItems:
Incomplete validation of mandatory child item
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela updated JCR-2333:
------------------------
Attachment: JCR_2333.patch
patch addition the checks suggested above (and replacing some for-loops by foreach-loops)
was there another possibility to take a look at the child item defs rather than retrieving the child items themselves?
> ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
> ------------------------------------------------------------------------------
>
> Key: JCR-2333
> URL: https://issues.apache.org/jira/browse/JCR-2333
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: angela
> Fix For: 2.0.0
>
> Attachments: JCR_2333.patch
>
>
> ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
> been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
> existing item really has the mandatory definition.
> the example i had:
> - mandatory single-value property.
> - there is the possibility to add residual props
> - added a residual property with the name of the mandatory prop but with multiple values
> -> changes are saved without exception.
> -> the node doesn't have a property with the mandatory definition.
> ((without having tried it out, i think the same would be possible with child nodes))
> suggested fix:
> if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
> patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2333) ItemImpl#validateTransientItems:
Incomplete validation of mandatory child item
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela updated JCR-2333:
------------------------
Attachment: JCR-2333_2.patch
alternative patch accessing the ItemData instead of the Item itself in order to retrieve the definition.
drawback: ItemManager#getItemData was private -> changed.
> ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
> ------------------------------------------------------------------------------
>
> Key: JCR-2333
> URL: https://issues.apache.org/jira/browse/JCR-2333
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: angela
> Fix For: 2.0.0
>
> Attachments: JCR-2333_2.patch, JCR_2333.patch
>
>
> ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
> been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
> existing item really has the mandatory definition.
> the example i had:
> - mandatory single-value property.
> - there is the possibility to add residual props
> - added a residual property with the name of the mandatory prop but with multiple values
> -> changes are saved without exception.
> -> the node doesn't have a property with the mandatory definition.
> ((without having tried it out, i think the same would be possible with child nodes))
> suggested fix:
> if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
> patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (JCR-2333)
ItemImpl#validateTransientItems: Incomplete validation of mandatory child
item
Posted by "angela (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760524#action_12760524 ]
angela edited comment on JCR-2333 at 9/30/09 1:02 AM:
------------------------------------------------------
patch adding the checks suggested above (and replacing some for-loops by foreach-loops)
was there another possibility to take a look at the child item defs rather than retrieving the child items themselves?
was (Author: anchela):
patch addition the checks suggested above (and replacing some for-loops by foreach-loops)
was there another possibility to take a look at the child item defs rather than retrieving the child items themselves?
> ItemImpl#validateTransientItems: Incomplete validation of mandatory child item
> ------------------------------------------------------------------------------
>
> Key: JCR-2333
> URL: https://issues.apache.org/jira/browse/JCR-2333
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: angela
> Fix For: 2.0.0
>
> Attachments: JCR-2333_2.patch, JCR_2333.patch
>
>
> ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have
> been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that
> existing item really has the mandatory definition.
> the example i had:
> - mandatory single-value property.
> - there is the possibility to add residual props
> - added a residual property with the name of the mandatory prop but with multiple values
> -> changes are saved without exception.
> -> the node doesn't have a property with the mandatory definition.
> ((without having tried it out, i think the same would be possible with child nodes))
> suggested fix:
> if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...)
> patch will follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.