From fa6f57e3ddbca856b994d73762c3f49b48a796cd Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Mon, 10 Nov 2008 04:12:53 +0000 Subject: [PATCH] Fixed TestVoter to match recent API updates --- .../src/main/java/sample/TestVoter.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sandbox/heavyduty/src/main/java/sample/TestVoter.java b/sandbox/heavyduty/src/main/java/sample/TestVoter.java index df4d20c82f..c5bd4222ae 100644 --- a/sandbox/heavyduty/src/main/java/sample/TestVoter.java +++ b/sandbox/heavyduty/src/main/java/sample/TestVoter.java @@ -1,30 +1,30 @@ package sample; import java.lang.annotation.Annotation; +import java.util.List; import org.aopalliance.intercept.MethodInvocation; import org.springframework.security.Authentication; import org.springframework.security.ConfigAttribute; -import org.springframework.security.ConfigAttributeDefinition; import org.springframework.security.vote.AccessDecisionVoter; public class TestVoter implements AccessDecisionVoter { - public boolean supports(ConfigAttribute attribute) { - return true; - } + public boolean supports(ConfigAttribute attribute) { + return true; + } - public boolean supports(Class clazz) { - return MethodInvocation.class.isAssignableFrom(clazz); - } + public boolean supports(Class clazz) { + return MethodInvocation.class.isAssignableFrom(clazz); + } - public int vote(Authentication authentication, Object object, ConfigAttributeDefinition config) { - MethodInvocation mi = (MethodInvocation) object; - - Annotation[][] annotations = mi.getMethod().getParameterAnnotations(); - + public int vote(Authentication authentication, Object object, List config) { + MethodInvocation mi = (MethodInvocation) object; - return ACCESS_GRANTED; - } + Annotation[][] annotations = mi.getMethod().getParameterAnnotations(); + + + return ACCESS_GRANTED; + } }