mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1364: Do not rely on Collectors.toUnmodifiableMap() as it is not part of Java 8.
This commit is contained in:
@@ -92,13 +92,13 @@ public class SAMLAuthenticatedUser extends AbstractAuthenticatedUser {
|
||||
* for substitution as parameter tokens.
|
||||
*/
|
||||
private Map<String, String> getTokens(AssertedIdentity identity) {
|
||||
return identity.getAttributes().entrySet()
|
||||
return Collections.unmodifiableMap(identity.getAttributes().entrySet()
|
||||
.stream()
|
||||
.filter((entry) -> !entry.getValue().isEmpty())
|
||||
.collect(Collectors.toUnmodifiableMap(
|
||||
.collect(Collectors.toMap(
|
||||
(entry) -> TokenName.canonicalize(entry.getKey(), SAML_ATTRIBUTE_TOKEN_PREFIX),
|
||||
(entry) -> entry.getValue().get(0)
|
||||
));
|
||||
)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user