فهرست منبع

Changed to not detect null returns, as the UserMap will now throw the UsernameNotFoundException.

Ben Alex 21 سال پیش
والد
کامیت
d59a5da321
1فایلهای تغییر یافته به همراه1 افزوده شده و 7 حذف شده
  1. 1 7
      core/src/main/java/org/acegisecurity/userdetails/memory/InMemoryDaoImpl.java

+ 1 - 7
core/src/main/java/org/acegisecurity/userdetails/memory/InMemoryDaoImpl.java

@@ -54,12 +54,6 @@ public class InMemoryDaoImpl implements AuthenticationDao, InitializingBean {
 
     public User loadUserByUsername(String username)
         throws UsernameNotFoundException, DataAccessException {
-        User result = userMap.getUser(username);
-
-        if (result == null) {
-            throw new UsernameNotFoundException("User could not be found");
-        }
-
-        return result;
+        return userMap.getUser(username);
     }
 }