[dna-issues] [JBoss JIRA] Commented: (DNA-291) JCR property objects do not have PropertyDefinition
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Wed Mar 4 14:09:22 EST 2009
[ https://jira.jboss.org/jira/browse/DNA-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12455480#action_12455480 ]
Randall Hauch commented on DNA-291:
-----------------------------------
Restructured how our Property implementations create Value objects, since the Value objects cannot be cached in the Property. Section 6.2.7 of JSR-170 says that Value objects can become unusable after Value.getStream() is called, and the proper procedure in this case is for the client to get a new Value object. Therefore Property objects have to be able to re-create new Value objects.
This change led me to look more into how JcrAbstractProperty, JcrProperty, and JcrMultiValueProperty are implemented. I was able to simplify them quite a bit by having them hold onto the DNA Property instance, and to pass in the PropertyDefinition into the constructor. Several other errors were found in the current code, including "Property.getNode()" does not return the parent node that owns the property (that's "Property.getParent()"), but should instead return the node pointed to by the reference property value.
The JcrSession.populateNode(...) method was also refactored to validate the DNA graph node using the primary node type and mixin types, and to find and associate the appropriate PropertyDefinition with each of the node's properties.
All of these changes had a fairly large impact on the unit tests for these classes, so these were fixed. Note that any test methods that check for AssertionException is not a valid test (as the tests should be able be run without assertions enabled to verify the behavior is still correct).
Also enabled several JCR TCK tests, since we're now passing all of their test methods. Not too many remain for JCR Level 1 compliance!
> JCR property objects do not have PropertyDefinition
> ---------------------------------------------------
>
> Key: DNA-291
> URL: https://jira.jboss.org/jira/browse/DNA-291
> Project: DNA
> Issue Type: Bug
> Components: JCR
> Affects Versions: 0.3
> Reporter: Randall Hauch
> Assignee: Randall Hauch
> Fix For: 0.4
>
>
> Our JCR Property objects are not properly initialized with a valid PropertyDefinition. Per the JSR-170 spec, each Property must have a PropertyDefinition. I think when first implemented, we didn't have a NodeTypeManager implementation, so this was not really possible.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list