question: private RegistrationResult checkPassword ( String password , String confirmPassword ) { if ( ( password == null ) || password . length ( ) == 0 ) { if ( debug . messageEnabled ( ) ) { debug . message ( "password was missing from the form" ) ; } return RegistrationResult . NO_PASSWORD_ERROR ; } else { if ( password . length ( ) < requiredPasswordLength ) { if ( debug . messageEnabled ( ) ) { debug . message ( "password was not long enough" ) ; } return RegistrationResult . PASSWORD_TOO_SHORT ; } if ( ( confirmPassword == null ) || confirmPassword . length ( ) == 0 ) { if ( debug . messageEnabled ( ) ) { debug . message ( "no confirmation password" ) ; } return RegistrationResult . NO_CONFIRMATION_ERROR ; } else { if ( ! password . equals ( confirmPassword ) ) { return RegistrationResult . PASSWORD_MISMATCH_ERROR ; } } } return RegistrationResult . NO_ERROR ; }
target:  Checks the passwords and returned error state or SUCCEEDED if the passwords are valid.