diff --git a/core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java b/core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java index 563f726a42..97b201d085 100644 --- a/core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java +++ b/core/src/main/java/org/springframework/security/access/expression/SecurityExpressionRoot.java @@ -17,7 +17,6 @@ package org.springframework.security.access.expression; import java.io.Serializable; import java.util.Collection; -import java.util.HashSet; import java.util.Set; import org.springframework.security.access.PermissionEvaluator; @@ -158,7 +157,6 @@ public abstract class SecurityExpressionRoot implements SecurityExpressionOperat private Set getAuthoritySet() { if (roles == null) { - roles = new HashSet<>(); Collection userAuthorities = authentication .getAuthorities();