Commit 9406aef7 authored by Greg Messner's avatar Greg Messner
Browse files

Change getUser(int) to getUser(Integer) to be consistent.

parent 208bf520
...@@ -260,7 +260,7 @@ public class UserApi extends AbstractApi { ...@@ -260,7 +260,7 @@ public class UserApi extends AbstractApi {
* @return the User instance for the specified user ID * @return the User instance for the specified user ID
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public User getUser(int userId) throws GitLabApiException { public User getUser(Integer userId) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("with_custom_attributes", customAttributesEnabled); GitLabApiForm formData = new GitLabApiForm().withParam("with_custom_attributes", customAttributesEnabled);
Response response = get(Response.Status.OK, formData.asMap(), "users", userId); Response response = get(Response.Status.OK, formData.asMap(), "users", userId);
return (response.readEntity(User.class)); return (response.readEntity(User.class));
...@@ -274,7 +274,7 @@ public class UserApi extends AbstractApi { ...@@ -274,7 +274,7 @@ public class UserApi extends AbstractApi {
* @param userId the ID of the user to get * @param userId the ID of the user to get
* @return the User for the specified user ID as an Optional instance * @return the User for the specified user ID as an Optional instance
*/ */
public Optional<User> getOptionalUser(int userId) { public Optional<User> getOptionalUser(Integer userId) {
try { try {
return (Optional.ofNullable(getUser(userId))); return (Optional.ofNullable(getUser(userId)));
} catch (GitLabApiException glae) { } catch (GitLabApiException glae) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment