From 69b71ee0ed917f5ed1b42242bb31e25e8981244b Mon Sep 17 00:00:00 2001 From: John Lin Date: Fri, 21 Sep 2018 13:56:36 +0800 Subject: [PATCH] Remove unused variables in ConsensusBased and UnanimousBased --- .../springframework/security/access/vote/ConsensusBased.java | 3 --- .../springframework/security/access/vote/UnanimousBased.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/core/src/main/java/org/springframework/security/access/vote/ConsensusBased.java b/core/src/main/java/org/springframework/security/access/vote/ConsensusBased.java index 4f95de5d64..640fad4cf7 100644 --- a/core/src/main/java/org/springframework/security/access/vote/ConsensusBased.java +++ b/core/src/main/java/org/springframework/security/access/vote/ConsensusBased.java @@ -68,7 +68,6 @@ public class ConsensusBased extends AbstractAccessDecisionManager { Collection configAttributes) throws AccessDeniedException { int grant = 0; int deny = 0; - int abstain = 0; for (AccessDecisionVoter voter : getDecisionVoters()) { int result = voter.vote(authentication, object, configAttributes); @@ -89,8 +88,6 @@ public class ConsensusBased extends AbstractAccessDecisionManager { break; default: - abstain++; - break; } } diff --git a/core/src/main/java/org/springframework/security/access/vote/UnanimousBased.java b/core/src/main/java/org/springframework/security/access/vote/UnanimousBased.java index b40df499ac..a4a669ff0d 100644 --- a/core/src/main/java/org/springframework/security/access/vote/UnanimousBased.java +++ b/core/src/main/java/org/springframework/security/access/vote/UnanimousBased.java @@ -64,7 +64,6 @@ public class UnanimousBased extends AbstractAccessDecisionManager { Collection attributes) throws AccessDeniedException { int grant = 0; - int abstain = 0; List singleAttributeList = new ArrayList<>(1); singleAttributeList.add(null); @@ -91,8 +90,6 @@ public class UnanimousBased extends AbstractAccessDecisionManager { "Access is denied")); default: - abstain++; - break; } }