You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Julian Reschke (JIRA)" <ji...@apache.org> on 2007/08/27 17:35:37 UTC

[jira] Created: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

more lenient behavior of Node#addMixin if mixin is already present 
-------------------------------------------------------------------

                 Key: JCR-1091
                 URL: https://issues.apache.org/jira/browse/JCR-1091
             Project: Jackrabbit
          Issue Type: Improvement
            Reporter: Julian Reschke
            Priority: Minor


Change implementation of addMixin() so that it doesn't fail when the mixin is already present.

See also:

jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>

JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>

(this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

angela updated JCR-1091:
------------------------

    Component/s:     (was: jackrabbit-spi)
                 jackrabbit-jcr2spi

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.4
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Julian Reschke reassigned JCR-1091:
-----------------------------------

    Assignee: Julian Reschke

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Jukka Zitting resolved JCR-1091.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.0

Implemented the jcr2spi change in revision 705961.

My previous patch modified the canAddMixin() method that was used by addMixin() to validate the request to add the mixin. However, since the TCK uses the same canAddMixin() method to find new mixins (i.e. ones that are not already included in a node) to add to a node, the tests would always fail.

The committed resolution adds the "succeed if the mixin is already set" test directly in the addMixin() method.

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.5.0
>
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523047 ] 

Julian Reschke commented on JCR-1091:
-------------------------------------

Enhanced TCK as proposed in revision 570180.


> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Jukka Zitting updated JCR-1091:
-------------------------------

    Attachment: JCR-1091.patch

See the attached patch (JCR-1091.patch) for my take on the required changes in jcr2spi.

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

Posted by "Julian Reschke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523031 ] 

Julian Reschke commented on JCR-1091:
-------------------------------------

Proposal for next steps:

JCR2SPI: mirror the change in jackrabbit-core.

TCK: unless JSR170 is changed, do not rely on the lenient behaviour; instead add a convenience method that checks whether adding a mixin type is needed, and use that throughout. As in:

public boolean needsMixin(Node n, String mixin) {
  return ! n.getSession().getWorkspace().getNodeTypeManager().getNodeType(n.getNodeType()).isNodeType(mixin);
}

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639773#action_12639773 ] 

Jukka Zitting commented on JCR-1091:
------------------------------------

I never got around to resolving the test failures. I'm not sure if they still occur with this patch.

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639772#action_12639772 ] 

angela commented on JCR-1091:
-----------------------------

what is the status of this issue? can we close it? is there something left to be done?

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Jukka Zitting commented on JCR-1091:
------------------------------------

Hmm, the patch causes some test failures. I'll work it out.

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Jukka Zitting updated JCR-1091:
-------------------------------

      Component/s: SPI
                   nodetype
                   JCR 2.0
                   jackrabbit-jcr-tests
                   jackrabbit-core
    Fix Version/s: 1.4

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, JCR 2.0, nodetype, SPI
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>             Fix For: 1.4
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1091) more lenient behavior of Node#addMixin if mixin is already present

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

Jukka Zitting updated JCR-1091:
-------------------------------

    Fix Version/s:     (was: 1.4)

> more lenient behavior of Node#addMixin if mixin is already present 
> -------------------------------------------------------------------
>
>                 Key: JCR-1091
>                 URL: https://issues.apache.org/jira/browse/JCR-1091
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core, jackrabbit-jcr-tests, jackrabbit-jcr2spi, JCR 2.0, nodetype
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Minor
>         Attachments: JCR-1091.patch
>
>
> Change implementation of addMixin() so that it doesn't fail when the mixin is already present.
> See also:
> jackrabbit core change: <http://svn.apache.org/viewvc?view=rev&revision=570149>
> JSR-283 issue: <https://jsr-283.dev.java.net/issues/show_bug.cgi?id=353>
> (this affects both the TCK and JCR2SPI, so I didn't specify a component)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.