Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
9406aef7
Commit
9406aef7
authored
May 14, 2019
by
Greg Messner
Browse files
Change getUser(int) to getUser(Integer) to be consistent.
parent
208bf520
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/UserApi.java
View file @
9406aef7
...
@@ -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
(
i
nt
userId
)
throws
GitLabApiException
{
public
User
getUser
(
I
nt
eger
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
(
i
nt
userId
)
{
public
Optional
<
User
>
getOptionalUser
(
I
nt
eger
userId
)
{
try
{
try
{
return
(
Optional
.
ofNullable
(
getUser
(
userId
)));
return
(
Optional
.
ofNullable
(
getUser
(
userId
)));
}
catch
(
GitLabApiException
glae
)
{
}
catch
(
GitLabApiException
glae
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment