You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Matt Goodwin (JIRA)" <ji...@apache.org> on 2011/02/15 19:54:57 UTC

[jira] Created: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
-------------------------------------------------------------------------------------

                 Key: JCR-2891
                 URL: https://issues.apache.org/jira/browse/JCR-2891
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.2.2
         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
            Reporter: Matt Goodwin
             Fix For: 2.2.2


In method protected void internalRestoreFrozen(NodeStateEx state,
                                         InternalFrozenNode freeze,
                                         VersionSelector vsel,
                                         Set<InternalVersion> restored,
                                         boolean removeExisting,
                                         boolean copy)
in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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

        

[jira] Updated: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

Posted by "Matt Goodwin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Goodwin updated JCR-2891:
------------------------------

    Status: Patch Available  (was: Open)

Index: VersionManagerImplRestore.java
===================================================================
--- VersionManagerImplRestore.java	(revision 1071104)
+++ VersionManagerImplRestore.java	(working copy)
@@ -554,7 +554,7 @@
                 NodeId nodeId = vh.getVersionableId();
                 if (stateMgr.hasItemState(nodeId)) {
                     restoredChild = state.getNode(nodeId);
-                    if (restoredChild.getParentId() == state.getNodeId()) {
+                    if (restoredChild.getParentId().equals(state.getNodeId())) {
                         // if same parent, ignore
                     } else if (removeExisting) {
                         NodeStateEx parent = restoredChild.getNode(restoredChild.getParentId());


> VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2891
>                 URL: https://issues.apache.org/jira/browse/JCR-2891
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.2
>         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
>            Reporter: Matt Goodwin
>             Fix For: 2.2.2
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> In method protected void internalRestoreFrozen(NodeStateEx state,
>                                          InternalFrozenNode freeze,
>                                          VersionSelector vsel,
>                                          Set<InternalVersion> restored,
>                                          boolean removeExisting,
>                                          boolean copy)
> in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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

        

[jira] Assigned: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg reassigned JCR-2891:
--------------------------------------

    Assignee: Stefan Guggisberg

> VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2891
>                 URL: https://issues.apache.org/jira/browse/JCR-2891
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.2
>         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
>            Reporter: Matt Goodwin
>            Assignee: Stefan Guggisberg
>             Fix For: 2.2.2
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> In method protected void internalRestoreFrozen(NodeStateEx state,
>                                          InternalFrozenNode freeze,
>                                          VersionSelector vsel,
>                                          Set<InternalVersion> restored,
>                                          boolean removeExisting,
>                                          boolean copy)
> in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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

        

[jira] Updated: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-2891:
-------------------------------

    Fix Version/s:     (was: 2.3.0)
                   2.2.5
                   2.1.4

Merged to the 2.2 branch in revision 1071647 and to the 2.1 branch in revision 1071652.

> VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2891
>                 URL: https://issues.apache.org/jira/browse/JCR-2891
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.2
>         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
>            Reporter: Matt Goodwin
>            Assignee: Stefan Guggisberg
>             Fix For: 2.1.4, 2.2.5
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> In method protected void internalRestoreFrozen(NodeStateEx state,
>                                          InternalFrozenNode freeze,
>                                          VersionSelector vsel,
>                                          Set<InternalVersion> restored,
>                                          boolean removeExisting,
>                                          boolean copy)
> in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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

        

[jira] Updated: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg updated JCR-2891:
-----------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

fixed in trunk (svn rev. 1071562)

> VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2891
>                 URL: https://issues.apache.org/jira/browse/JCR-2891
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.2
>         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
>            Reporter: Matt Goodwin
>            Assignee: Stefan Guggisberg
>             Fix For: 2.3.0
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> In method protected void internalRestoreFrozen(NodeStateEx state,
>                                          InternalFrozenNode freeze,
>                                          VersionSelector vsel,
>                                          Set<InternalVersion> restored,
>                                          boolean removeExisting,
>                                          boolean copy)
> in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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

        

[jira] Updated: (JCR-2891) VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug

Posted by "Stefan Guggisberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guggisberg updated JCR-2891:
-----------------------------------

    Fix Version/s:     (was: 2.2.2)
                   2.3.0

> VersionManagerImplRestore internalRestoreFrozen method has identity versus equals bug
> -------------------------------------------------------------------------------------
>
>                 Key: JCR-2891
>                 URL: https://issues.apache.org/jira/browse/JCR-2891
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.2
>         Environment: Exists in 2.2.4 version of code base (as well as 2.3)
>            Reporter: Matt Goodwin
>            Assignee: Stefan Guggisberg
>             Fix For: 2.3.0
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> In method protected void internalRestoreFrozen(NodeStateEx state,
>                                          InternalFrozenNode freeze,
>                                          VersionSelector vsel,
>                                          Set<InternalVersion> restored,
>                                          boolean removeExisting,
>                                          boolean copy)
> in the VersionManagerImplRestore class line 557 the code performs an == instead of calling the NodeId.equals() method.  We ran into problems with the code that executes below this (trying to restore a folder node throws an ItemExistsException since same sibling not allowed on folder nodes)

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