jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-2743) ClassCastException in GroupImpl.isCyclicMembership
Date Thu, 09 Sep 2010 11:36:33 GMT

    [ https://issues.apache.org/jira/browse/JCR-2743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907598#action_12907598
] 

Michael Dürig commented on JCR-2743:
------------------------------------

Here is a test proving the case:

            group1 = userMgr.createGroup(getTestPrincipal());
            group2 = userMgr.createGroup(getTestPrincipal());
            group3 = userMgr.createGroup(getTestPrincipal());

            group1.addMember(getTestUser(superuser));
            group2.addMember(getTestUser(superuser));

            assertTrue(group1.addMember(group2));
            assertTrue(group2.addMember(group3));
            assertFalse(group3.addMember(group1));

the last line throws a ClassCastException

> ClassCastException in GroupImpl.isCyclicMembership
> --------------------------------------------------
>
>                 Key: JCR-2743
>                 URL: https://issues.apache.org/jira/browse/JCR-2743
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2.0
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>
> Given three groups and one user with the following membership relation
> group1 > group2 > group3
> group2 > user
> where x > y means x contains y.
> group3.addMember(group1) throws a ClassCastException.
> The reason is that the search type (i.e. UserManager.SEARCH_TYPE_GROUP) is not honored
correctly when constructing the transitive membership relation. 

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


Mime
View raw message