core/src/main/java/org/springframework/security/core/authority/mapping/MapBasedAttributes2GrantedAuthoritiesMapper.java
public List<GrantedAuthority> getGrantedAuthorities(Collection<String> attributes) {
		ArrayList<GrantedAuthority> gaList = new ArrayList<>();
		for (String attribute : attributes) {
			Collection<GrantedAuthority> c = attributes2grantedAuthoritiesMap
					.get(attribute);
			if (c != null) {
				gaList.addAll(c);
			}
		}
		gaList.trimToSize();

		return gaList;
	}
public List<GrantedAuthority> getGrantedAuthorities(Collection<String> attributes) {
		ArrayList<GrantedAuthority> gaList = new ArrayList<>();
		for (String attribute : attributes) {
			Collection<GrantedAuthority> c = attributes2grantedAuthoritiesMap
					.get(attribute);
			if (c != null) {
				gaList.addAll(c);
			}
		}
		gaList.trimToSize();

		return gaList;
	}
public List < GrantedAuthority > getGrantedAuthorities ( Collection < String > attributes ) { ArrayList < GrantedAuthority > gaList = new ArrayList <> ( ) ; for ( String attribute : attributes ) { Collection < GrantedAuthority > c = attributes2grantedAuthoritiesMap . get ( attribute ) ; if ( c != null ) { gaList . addAll ( c ) ; } } gaList . trimToSize ( ) ; return gaList ; }
Map the given array of attributes to Spring Security GrantedAuthorities.
Map the given array of attributes to Spring Security GrantedAuthorities .