[ 
https://issues.apache.org/jira/browse/JCRVLT-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke updated JCRVLT-684:
----------------------------------
    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

{noformat}
        // 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());
            }
        }
{noformat}

looks fishy to me. Shouldn't it be:

{noformat}
        // 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());
            }
        }
{noformat}

?



  was:
This:

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

{noformat}
        // 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());
            }
        }
{noformat}

looks fishy to me. Shouldn't it be:

{noformat}
        // 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());
            }
        }
{noformat}




> Mixins recovered using stashing set on incorrect node
> -----------------------------------------------------
>
>                 Key: JCRVLT-684
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-684
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: vlt
>    Affects Versions: 3.5.4
>            Reporter: Julian Reschke
>            Priority: Major
>
> This:
> https://github.com/apache/jackrabbit-filevault/blob/master/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/NodeStash.java#L215
> {noformat}
>         // 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());
>             }
>         }
> {noformat}
> looks fishy to me. Shouldn't it be:
> {noformat}
>         // 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());
>             }
>         }
> {noformat}
> ?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to