Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/main/java/org/gitlab4j/api/AbstractApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public Object getProjectIdOrPath(Object obj) throws GitLabApiException {
return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Project) {

Integer id = ((Project) obj).getId();
if (id != null && id.intValue() > 0) {
Long id = ((Project) obj).getId();
if (id != null && id.longValue() > 0) {
return (id);
}

Expand Down Expand Up @@ -81,8 +81,8 @@ public Object getGroupIdOrPath(Object obj) throws GitLabApiException {
return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Group) {

Integer id = ((Group) obj).getId();
if (id != null && id.intValue() > 0) {
Long id = ((Group) obj).getId();
if (id != null && id.longValue() > 0) {
return (id);
}

Expand Down Expand Up @@ -116,8 +116,8 @@ public Object getUserIdOrUsername(Object obj) throws GitLabApiException {
return (urlEncode(((String) obj).trim()));
} else if (obj instanceof User) {

Integer id = ((User) obj).getId();
if (id != null && id.intValue() > 0) {
Long id = ((User) obj).getId();
if (id != null && id.longValue() > 0) {
return (id);
}

Expand Down Expand Up @@ -151,8 +151,8 @@ public Object getLabelIdOrName(Object obj) throws GitLabApiException {
return (urlEncode(((String) obj).trim()));
} else if (obj instanceof Label) {

Integer id = ((Label) obj).getId();
if (id != null && id.intValue() > 0) {
Long id = ((Label) obj).getId();
if (id != null && id.longValue() > 0) {
return (id);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/gitlab4j/api/ApplicationSettingsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ApplicationSettings getApplicationSettings() throws GitLabApiException {
}

/**
* Update the application settings of the GitLab instance with the settings in the
* Update the application settings of the GitLab instance with the settings in the
* provided ApplicationSettings instance.
*
* <pre><code>GitLab Endpoint: PUT /api/v4/application/settings</code></pre>
Expand Down Expand Up @@ -117,7 +117,7 @@ public static final ApplicationSettings parseApplicationSettings(JsonNode root)
String fieldName = fieldNames.next();
switch (fieldName) {
case "id":
appSettings.setId(root.path(fieldName).asInt());
appSettings.setId(root.path(fieldName).asLong());
break;

case "created_at":
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/gitlab4j/api/ApplicationsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public Application createApplication(String name, String redirectUri, List<Appli
* @param applicationId the ID of the OUAUTH Application to delete
* @throws GitLabApiException if any exception occurs
*/
public void deleteApplication(Integer applicationId) throws GitLabApiException {
public void deleteApplication(Long applicationId) throws GitLabApiException {
delete(Response.Status.NO_CONTENT, null, "applications", applicationId);
}
}
8 changes: 4 additions & 4 deletions src/main/java/org/gitlab4j/api/AuditEventApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public AuditEventApi(GitLabApi gitLabApi) {
* @return a List of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException {
public List<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).all());
}

Expand All @@ -49,7 +49,7 @@ public List<AuditEvent> getAuditEvents(Date created_after, Date created_before,
* @return a Pager of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Integer entityId, int itemsPerPage) throws GitLabApiException {
public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before, String entityType, Long entityId, int itemsPerPage) throws GitLabApiException {
Form form = new GitLabApiForm()
.withParam("created_before", ISO8601.toString(created_before, false))
.withParam("created_after", ISO8601.toString(created_after, false))
Expand All @@ -70,7 +70,7 @@ public Pager<AuditEvent> getAuditEvents(Date created_after, Date created_before,
* @return a Stream of group Audit events
* @throws GitLabApiException if any exception occurs
*/
public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Integer entityId) throws GitLabApiException {
public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_before, String entityType, Long entityId) throws GitLabApiException {
return (getAuditEvents(created_after, created_before, entityType, entityId, getDefaultPerPage()).stream());
}

Expand All @@ -83,7 +83,7 @@ public Stream<AuditEvent> getAuditEventsStream(Date created_after, Date created_
* @return the group Audit event
* @throws GitLabApiException if any exception occurs
*/
public AuditEvent getAuditEvent(Integer auditEventId) throws GitLabApiException {
public AuditEvent getAuditEvent(Long auditEventId) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "audit_events", auditEventId);
return (response.readEntity(AuditEvent.class));
}
Expand Down
Loading