Prechádzať zdrojové kódy

SEC-717: Resolve UserDetails.getAuthorities() sort logic issue.

Ben Alex 17 rokov pred
rodič
commit
072b76e516

+ 2 - 2
adapters/jboss/src/test/java/org/springframework/security/adapters/jboss/JbossSpringSecurityLoginModuleTests.java

@@ -240,8 +240,8 @@ public class JbossSpringSecurityLoginModuleTests extends TestCase {
         PrincipalSpringSecurityUserToken castResult = (PrincipalSpringSecurityUserToken) result;
         assertEquals("rod", castResult.getPrincipal());
         assertEquals("koala", castResult.getCredentials());
-        assertEquals("ROLE_TELLER", castResult.getAuthorities()[0].getAuthority());
-        assertEquals("ROLE_SUPERVISOR", castResult.getAuthorities()[1].getAuthority());
+        assertEquals("ROLE_TELLER", castResult.getAuthorities()[1].getAuthority());
+        assertEquals("ROLE_SUPERVISOR", castResult.getAuthorities()[0].getAuthority());
         assertEquals(ADAPTER_KEY.hashCode(), castResult.getKeyHash());
     }