Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-999

Version creates frozenNode children with orignial NoteType instead of frozenNode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8
    • 0.9
    • jcr
    • None

    Description

      For a Version the the children of a the Versions FrozenNode have the the NodeType of their origin if they are not rferenceable. Expected is nt:frozenNode.

      The JCR Spec is not explicit on the node-type for this Nodes but it is not Compatible with JR2

      Dummy Test Case that just starts a Oak Repository

      public class Issue extends RepositoryBaseTest {
      
          @Test
          public void testVersionChild() throws RepositoryException {
              Session admin = getAdminSession();
              Node parent = admin.getRootNode().addNode(getClass().getSimpleName()+System.currentTimeMillis(), JcrConstants.NT_UNSTRUCTURED);
              Node child = parent.addNode("child");
              parent.addMixin(JcrConstants.MIX_VERSIONABLE);
              admin.save();
              VersionManager vm = admin.getWorkspace().getVersionManager();
              Version v = vm.checkin(parent.getPath());
      
              Node frozenChild = v.getFrozenNode().getNode(child.getName());
              Assert.assertEquals(JcrConstants.NT_FROZENNODE, frozenChild.getPrimaryNodeType().getName());
          }
      
      }
      

      Attachments

        Activity

          People

            mreutegg Marcel Reutegger
            chkeller Christan Keller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: