From 4b4c6e612b14251b4b1edf5d58d0214fc5434008 Mon Sep 17 00:00:00 2001 From: LeeHainie <30332409+LeeHainie@users.noreply.github.com> Date: Thu, 7 Nov 2019 17:26:02 +0800 Subject: [PATCH] Remove unnecessary instantiation in root Fixes: gh-7635 --- .../security/access/expression/SecurityExpressionRoot.java | 2 -- 1 file changed, 2 deletions(-) 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();