Skip to content

Commit

Permalink
Refactoring of proc-test leading to minor discovered mistakes, that a…
Browse files Browse the repository at this point in the history
…re now fixed.
  • Loading branch information
fickludd committed Jul 4, 2016
1 parent a1b5b3f commit 69b0898
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 215 deletions.
Expand Up @@ -430,10 +430,20 @@ public User assertAndGetUser( String username ) throws IllegalArgumentException
return u; return u;
} }


public User assertCredentialsAndGetUser( String username ) throws IllegalCredentialsException
{
User u = getUser( username );
if ( u == null )
{
throw new IllegalCredentialsException( "User " + username + " does not exist." );
}
return u;
}

@Override @Override
public void setUserPassword( String username, String password ) throws IOException, IllegalCredentialsException public void setUserPassword( String username, String password ) throws IOException, IllegalCredentialsException
{ {
User existingUser = assertAndGetUser( username ); User existingUser = assertCredentialsAndGetUser( username );


passwordPolicy.validatePassword( password ); passwordPolicy.validatePassword( password );


Expand Down

0 comments on commit 69b0898

Please sign in to comment.