jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samuel Cox (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-2427) UUIDDocId.getDocumentNumbers() may return illegal value
Date Thu, 15 Sep 2011 15:16:09 GMT

    [ https://issues.apache.org/jira/browse/JCR-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105420#comment-13105420
] 

Samuel Cox commented on JCR-2427:
---------------------------------

We need this for 1.6 as well.

It looks like the backport would be easy:

-            if (itemState.isNode()) {
-                def = itemMgr.getDefinition((NodeState) itemState).unwrap();
-            } else {
-                def = itemMgr.getDefinition((PropertyState) itemState).unwrap();
+            try {
+                if (itemState.isNode()) {
+                    def = itemMgr.getDefinition((NodeState) itemState).unwrap();
+                } else {
+                    def = itemMgr.getDefinition((PropertyState) itemState).unwrap();
+                }
+            } catch (ConstraintViolationException e) {
+                // since identifier of assigned definition is not stored anymore
+                // with item state (see JCR-2170), correct definition cannot be
+                // determined for items which have been removed due to removal
+                // of a mixin (see also JCR-2130 & JCR-2408)
+                continue;



> UUIDDocId.getDocumentNumbers() may return illegal value
> -------------------------------------------------------
>
>                 Key: JCR-2427
>                 URL: https://issues.apache.org/jira/browse/JCR-2427
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.0-beta5
>            Reporter: Marcel Reutegger
>            Priority: Minor
>             Fix For: 2.0-beta6
>
>
> Happens when the node with the given UUID is not present in the index. The method then
returns -1, which is illegal. Document numbers must be >= 0. The method must returns an
empty array when the id is invalid, as documented in DocId.getDocumentNumbers().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message