Uploaded image for project: 'Jackrabbit FileVault'
  1. Jackrabbit FileVault
  2. JCRVLT-684

Mixins recovered using stashing set on incorrect node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.4
    • 3.7.0
    • vlt
    • None

    Description

      This:

      https://github.com/apache/jackrabbit-filevault/blob/master/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java#L215

              // restore mixins
              Property mixinProperty = tmpNode.hasProperty(JcrConstants.JCR_MIXINTYPES + PROTECTED_PROPERTIES_SUFFIX) ? tmpNode.getProperty(JcrConstants.JCR_MIXINTYPES + PROTECTED_PROPERTIES_SUFFIX) : null;
              if (mixinProperty != null) {
                  for (Value value : mixinProperty.getValues()) {
                      tmpNode.addMixin(value.getString());
                  }
              }
      

      looks fishy to me. Shouldn't it be:

              // restore mixins
              Property mixinProperty = tmpNode.hasProperty(JcrConstants.JCR_MIXINTYPES + PROTECTED_PROPERTIES_SUFFIX) ? tmpNode.getProperty(JcrConstants.JCR_MIXINTYPES + PROTECTED_PROPERTIES_SUFFIX) : null;
              if (mixinProperty != null) {
                  for (Value value : mixinProperty.getValues()) {
                      destNode.addMixin(value.getString());
                  }
              }
      

      ?

      Attachments

        1. with-jackrabbit.diff
          3 kB
          Julian Reschke

        Issue Links

          Activity

            People

              reschke Julian Reschke
              reschke Julian Reschke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: