[jboss-jira] [JBoss JIRA] Resolved: (JBAS-5498) JDK6: org.jboss.test.security.test.LoginModulesUnitTestCase

Shelly McGowan (JIRA) jira-events at lists.jboss.org
Thu May 8 15:07:22 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBAS-5498?page=all ]

Shelly McGowan resolved JBAS-5498.
----------------------------------

    Fix Version/s: JBossAS-4.2.3.GA
       Resolution: Done

> JDK6: org.jboss.test.security.test.LoginModulesUnitTestCase
> -----------------------------------------------------------
>
>                 Key: JBAS-5498
>                 URL: http://jira.jboss.com/jira/browse/JBAS-5498
>             Project: JBoss Application Server
>          Issue Type: Sub-task
>      Security Level: Public(Everyone can see) 
>          Components: Test Suite
>            Reporter: Shelly McGowan
>         Assigned To: Shelly McGowan
>             Fix For: JBossAS-4.2.3.GA
>
>
> The tests, testJdbc() and testControlFlags() ,fail when run with JDK 6 as the assertions verifying if the role is valid fail. It appears to be the way the test is coded to look up the member in the Set of Groups.   Simply backported the change which has been done for similar reasons in AS 5:
> -         Group roles = (Group) groups.iterator().next();
> +        Group roles = findRolesGroup(groups);
>           assertTrue("Java is a role", roles.isMember(new SimplePrincipal("Java")));
>           assertTrue("Coder is a role", roles.isMember(new SimplePrincipal("Coder")));
> -         Group roles = (Group) groups.iterator().next();
> +         Group roles = findRolesGroup(groups);
>           // Only the roles from the DatabaseServerLoginModule should exist
>           assertTrue("Role1 is a role", roles.isMember(new SimplePrincipal("Role1")));
>           assertTrue("Role2 is a role", roles.isMember(new SimplePrincipal("Role2")));
> // Method to find the group named "Roles" in the given Set of groups.
> +   private Group findRolesGroup(Set groups)
> +   {
> +       // Find the "Roles" group:
> +       Iterator groupsIter = groups.iterator();
> +       Group roles = null;
> +       while (groupsIter.hasNext()) {
> +         roles = (Group)groupsIter.next();
> +         if (roles.getName().equals("Roles"))
> +                 break;
> +       }
> +       return roles;
> +   }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list