Created
December 30, 2014 15:12
-
-
Save orionll/bcc9b4da0635b78a37bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Java 1.8 | |
| roles.addAll(authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList())); | |
| // Java 1.5 | |
| for (GrantedAuthority authority : authentication.getAuthorities()) { | |
| roles.add(authority.getAuthority()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment