when extracting the original user, fix by referencing by the interface (UserDetail) rather than the concrete class (User)

This commit is contained in:
Mark St. Godard 2005-09-20 02:28:01 +00:00
parent 24394b7b2b
commit fb3f4af3b2
1 changed files with 2 additions and 2 deletions

View File

@ -263,8 +263,8 @@ public class SwitchUserProcessingFilter implements Filter, InitializingBean,
UserDetails originalUser = null;
Object obj = original.getPrincipal();
if ((obj != null) && obj instanceof User) {
originalUser = (User) obj;
if ((obj != null) && obj instanceof UserDetails) {
originalUser = (UserDetails) obj;
}
// publish event