this.log.debug("REST request to set account's password");
try {
User currentUser = authenticationService.getCurrentUser();
StandardPasswordEncoder encoder = new StandardPasswordEncoder();
if (!encoder.matches(userPassword.getOldPassword(), currentUser.getPassword())) {
log.debug("The old password is incorrect : {}", userPassword.getOldPassword());
throw new Exception("oldPassword");
}
if (!userPassword.getNewPassword().equals(userPassword.getNewPasswordConfirmation())) {