From d7b6ca281ab98ac0e56c80f3450a92744a719734 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sat, 27 Oct 2007 11:50:38 +0000 Subject: [PATCH] Removed unused "autodetect" method. --- .../TokenBasedRememberMeServices.java | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/core/src/main/java/org/springframework/security/ui/rememberme/TokenBasedRememberMeServices.java b/core/src/main/java/org/springframework/security/ui/rememberme/TokenBasedRememberMeServices.java index 1912568ae4..6e4c3ae283 100644 --- a/core/src/main/java/org/springframework/security/ui/rememberme/TokenBasedRememberMeServices.java +++ b/core/src/main/java/org/springframework/security/ui/rememberme/TokenBasedRememberMeServices.java @@ -135,28 +135,6 @@ public class TokenBasedRememberMeServices implements RememberMeServices, Initial Assert.notNull(userDetailsService); } - /** - * Introspects the Applicationcontext for the single instance - * of {@link AccessDeniedHandler}. If found invoke - * setAccessDeniedHandler(AccessDeniedHandler accessDeniedHandler) method by - * providing the found instance of accessDeniedHandler as a method - * parameter. If more than one instance of AccessDeniedHandler - * is found, the method throws IllegalStateException. - * - * @param applicationContext to locate the instance - */ - private void autoDetectAndUseAnyUserDetailsService(ApplicationContext applicationContext) { - Map map = applicationContext.getBeansOfType(UserDetailsService.class); - if (map.size() > 1) { - throw new IllegalArgumentException( - "More than one UserDetailsService beans detected please refer to the one using " - + " [ principalRepositoryBeanRef ] attribute"); - } - else if (map.size() == 1) { - setUserDetailsService((UserDetailsService) map.values().iterator().next()); - } - } - public Authentication autoLogin(HttpServletRequest request, HttpServletResponse response) { Cookie[] cookies = request.getCookies();