/** * {@inheritDoc} */ @Override protected boolean changePassword(String username, String generatedPassword) { try { String generatedPassHash = ""; if (generatedPassword != null) { generatedPassHash = digestAndEncode(generatedPassword.toCharArray()); } int updCount = getJdbcTemplate().update(getUpdateQuery(), generatedPassHash, username); if (updCount == 0) { throw new ActionException("Could not reset password for user " + username); } } catch (NoSuchAlgorithmException | IOException ex) { throw new ActionException(ex); } return true; }