Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1346

InternalValue.createCopy for binary properties (jcr:data) causes problems

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • core 1.4.1
    • jackrabbit-core
    • None

    Description

      Running 1.4 with no data store configured, and option org.jackrabbit.useDataStore not set (i.e true), the following code gives 0 for the property length.

      Node n = root.getNode(relPath);
      session.getWorkspace().copy(n.getPath(), destPath);
      Node contentNode = n.getNode(JcrConstants.JCR_CONTENT);
      Property p = contentNode.getProperty(JcrConstants.JCR_DATA);
      System.out.println("length = "+p.getLength());

      InternalValue.createCopy checks USE_DATA_STORE and returns the same value for the source node's state. BundleBinding.writeState() calls BLOBInMemory.discard() when persisting the new node. This has now changed the value of the existing nodes property. Setting the option org.jackrabbit.useDataStore to false works fine. Possibly the check for binary property type in InternalValue.createCopy should be done first?

      Attachments

        Activity

          People

            thomasm Thomas Mueller
            robowen Rob Owen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: