Example usage for org.springframework.dao IncorrectResultSizeDataAccessException printStackTrace

List of usage examples for org.springframework.dao IncorrectResultSizeDataAccessException printStackTrace

Introduction

In this page you can find the example usage for org.springframework.dao IncorrectResultSizeDataAccessException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler.java

protected final boolean authenticateUsernamePasswordInternal(final UsernamePasswordCredentials credentials)
        throws AuthenticationException {
    final String username = getPrincipalNameTransformer().transform(credentials.getUsername());
    final String password = credentials.getPassword();
    try {/*from w  w  w.  jav  a  2  s .c  om*/
        @SuppressWarnings("deprecation")
        final LoginPassword loginPassword = (LoginPassword) getJdbcTemplate().queryForObject(this.sql,
                new BeanPropertyRowMapper<LoginPassword>(LoginPassword.class),
                new Object[] { username, username });
        final String encryptedPassword = this.getPasswordEncoder()
                .encode(this.getPasswordEncoder().encode(password).concat(loginPassword.getSalt()));
        return loginPassword.getPassword().equals(encryptedPassword);
    } catch (final IncorrectResultSizeDataAccessException e) {
        e.printStackTrace();
        return false;
    }
}