Hello, the following method, 

    private Collection getPrincipalAuthorities() {
        SecureContext context = ((SecureContext)
ContextHolder.getContext());

        if (null == context) {
            return Collections.EMPTY_LIST;
        }

        Authentication currentUser = context.getAuthentication();

        if (null == currentUser) {
            return Collections.EMPTY_LIST;
        }

        Collection granted =
Arrays.asList(currentUser.getAuthorities());
        return granted;
    }


Could there be instances where currentUser.getAuthorities() returns
null. 
If so, Arrays.asList(currentUser.getAuthorities()); will throw an
exception. 

Thanks
Shishir


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to