Skip to content

Commit

Permalink
fix #16
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgregorio committed May 5, 2018
1 parent 8a82b21 commit a140654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>br.com.arthurgregorio</groupId>
<artifactId>library</artifactId>
<version>1.0.0</version>
<version>1.3.0</version>
<packaging>war</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ public void update(User user) {
user.setPassword(this.passwordEncoder.encryptPassword(
user.getPassword()));
} else {
user.setPassword(userOptional.get().getPassword());
final Optional<User> actualUser = this.userRepository
.findOptionalByUsername(user.getUsername());
user.setPassword(actualUser.get().getPassword());
}
}

Expand Down

0 comments on commit a140654

Please sign in to comment.