due to chained user manager we must check cause in case of a UserNotFoundException

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1469310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2013-04-18 13:21:37 +00:00
parent 3bba579fe4
commit e2cee99283
1 changed files with 6 additions and 3 deletions

View File

@ -44,7 +44,7 @@ import java.util.Map;
* @author Olivier Lamy * @author Olivier Lamy
* @since 1.4-M4 * @since 1.4-M4
*/ */
@Service( "userManager#archiva" ) @Service("userManager#archiva")
public class ArchivaConfigurableUsersManager public class ArchivaConfigurableUsersManager
extends AbstractUserManager extends AbstractUserManager
{ {
@ -58,7 +58,7 @@ public class ArchivaConfigurableUsersManager
private Map<String, UserManager> userManagerPerId; private Map<String, UserManager> userManagerPerId;
@Inject @Inject
@Named( value = "cache#users" ) @Named(value = "cache#users")
private Cache<String, User> usersCache; private Cache<String, User> usersCache;
private boolean useUsersCache; private boolean useUsersCache;
@ -231,6 +231,10 @@ public class ArchivaConfigurableUsersManager
{ {
if ( lastException != null ) if ( lastException != null )
{ {
if ( lastException instanceof UserNotFoundException )
{
throw (UserNotFoundException) lastException;
}
throw new UserManagerException( lastException.getMessage(), lastException ); throw new UserManagerException( lastException.getMessage(), lastException );
} }
} }
@ -451,7 +455,6 @@ public class ArchivaConfigurableUsersManager
} }
@Override @Override
public boolean isFinalImplementation() public boolean isFinalImplementation()
{ {