Skip to content

Commit 832cbb5

Browse files
istsergeygmessner
authored andcommitted
changed comparison of Integer references using the == to equals() (#138)
* Changed comparison of Integer references using the == to equals()
1 parent 1f9055a commit 832cbb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/gitlab4j/api/GitLabApi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public void setSudoAsId(Integer sudoAsId) throws GitLabApiException {
521521

522522
// Get the User specified by the sudoAsId, if you are not an admin or the username is not found, this will fail
523523
User user = getUserApi().getUser(sudoAsId);
524-
if (user == null || user.getId() != sudoAsId) {
524+
if (user == null || !user.getId().equals(sudoAsId)) {
525525
throw new GitLabApiException("the specified user ID was not found");
526526
}
527527

0 commit comments

Comments
 (0)