Unverified Commit b404e8a7 authored by Gautier de Saint Martin Lacaze's avatar Gautier de Saint Martin Lacaze Committed by GitHub
Browse files

Merge pull request #947 from jmini/move-to-jakarta

Replace javax package by jakarta package
parents 4289c1f9 1995a3f2
......@@ -8,7 +8,7 @@ import java.nio.file.Files;
import java.util.Base64;
import java.util.Scanner;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.Constants.Encoding;
......
......@@ -5,8 +5,8 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Enumeration;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
public class HttpRequestUtils {
......
......@@ -11,9 +11,9 @@ import java.util.List;
import java.util.Map;
import java.util.TimeZone;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.ContextResolver;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.ext.ContextResolver;
import org.gitlab4j.api.models.User;
import org.glassfish.jersey.jackson.internal.jackson.jaxrs.json.JacksonJaxbJsonProvider;
......
......@@ -19,16 +19,16 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Priority;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.ClientResponseContext;
import javax.ws.rs.client.ClientResponseFilter;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.WriterInterceptor;
import javax.ws.rs.ext.WriterInterceptorContext;
import jakarta.annotation.Priority;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.client.ClientRequestContext;
import jakarta.ws.rs.client.ClientRequestFilter;
import jakarta.ws.rs.client.ClientResponseContext;
import jakarta.ws.rs.client.ClientResponseFilter;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.ext.WriterInterceptor;
import jakarta.ws.rs.ext.WriterInterceptorContext;
import org.glassfish.jersey.message.MessageUtils;
......
......@@ -7,8 +7,8 @@ import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.StreamingOutput;
import jakarta.ws.rs.WebApplicationException;
import jakarta.ws.rs.core.StreamingOutput;
/**
* This StreamingOutput implementation is utilized to send a OAuth2 token request
......
......@@ -19,6 +19,7 @@ public class EventMergeRequest {
private Long iid;
private String mergeCommitSha;
private String mergeStatus;
private String detailedMergeStatus;
private Long milestoneId;
private Integer position;
private Date lockedAt;
......@@ -36,8 +37,11 @@ public class EventMergeRequest {
private EventProject source;
private EventProject target;
private EventCommit lastCommit;
private Boolean blockingDiscussionsResolved;
private Boolean workInProgress;
private Boolean firstContribution;
private String url;
private List<EventLabel> labels;
private String action;
private Assignee assignee;
......@@ -134,6 +138,14 @@ public class EventMergeRequest {
this.mergeStatus = mergeStatus;
}
public String getDetailedMergeStatus() {
return detailedMergeStatus;
}
public void setDetailedMergeStatus(String detailedMergeStatus) {
this.detailedMergeStatus = detailedMergeStatus;
}
public Long getMilestoneId() {
return this.milestoneId;
}
......@@ -262,6 +274,14 @@ public class EventMergeRequest {
this.lastCommit = lastCommit;
}
public Boolean getBlockingDiscussionsResolved() {
return blockingDiscussionsResolved;
}
public void setBlockingDiscussionsResolved(Boolean blockingDiscussionsResolved) {
this.blockingDiscussionsResolved = blockingDiscussionsResolved;
}
public Boolean getWorkInProgress() {
return workInProgress;
}
......@@ -270,6 +290,14 @@ public class EventMergeRequest {
this.workInProgress = workInProgress;
}
public Boolean getFirstContribution() {
return firstContribution;
}
public void setFirstContribution(Boolean firstContribution) {
this.firstContribution = firstContribution;
}
public String getUrl() {
return url;
}
......@@ -278,6 +306,14 @@ public class EventMergeRequest {
this.url = url;
}
public List<EventLabel> getLabels() {
return labels;
}
public void setLabels(List<EventLabel> labels) {
this.labels = labels;
}
public String getAction() {
return action;
}
......
......@@ -81,6 +81,7 @@ public class PipelineEvent extends AbstractEvent {
private Date createdAt;
private Date finishedAt;
private Integer duration;
private Float queuedDuration;
private List<Variable> variables;
public Long getId() {
......@@ -171,6 +172,14 @@ public class PipelineEvent extends AbstractEvent {
this.duration = duration;
}
public Float getQueuedDuration() {
return queuedDuration;
}
public void setQueuedDuration(Float queuedDuration) {
this.queuedDuration = queuedDuration;
}
public List<Variable> getVariables() {
return variables;
}
......
......@@ -7,7 +7,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import org.gitlab4j.api.GitLabApiException;
import org.gitlab4j.api.HookManager;
......
......@@ -9,14 +9,14 @@ import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Link;
import javax.ws.rs.core.Link.Builder;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.NewCookie;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.EntityTag;
import jakarta.ws.rs.core.GenericType;
import jakarta.ws.rs.core.Link;
import jakarta.ws.rs.core.Link.Builder;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.NewCookie;
import jakarta.ws.rs.core.Response;
/**
* This class can be used as a concrete mock to test the individual APIs
......
......@@ -2,8 +2,8 @@ package org.gitlab4j.api;
import java.io.IOException;
import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import jakarta.servlet.ReadListener;
import jakarta.servlet.ServletInputStream;
public class MockServletInputStream extends ServletInputStream {
......
......@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach;
......
......@@ -15,7 +15,7 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.models.Branch;
import org.gitlab4j.api.models.Comment;
......
......@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach;
......
......@@ -12,7 +12,7 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.ExternalStatusCheck;
import org.gitlab4j.api.models.ExternalStatusCheckStatus;
......
......@@ -78,6 +78,7 @@ import org.gitlab4j.api.models.Job;
import org.gitlab4j.api.models.Key;
import org.gitlab4j.api.models.Label;
import org.gitlab4j.api.models.LabelEvent;
import org.gitlab4j.api.models.Link;
import org.gitlab4j.api.models.Member;
import org.gitlab4j.api.models.MergeRequest;
import org.gitlab4j.api.models.MergeRequestDiff;
......@@ -373,6 +374,12 @@ public class TestGitLabApiBeans {
assertTrue(compareJson(linkedIssues, "linked-issues.json"));
}
@Test
public void testLinks() throws Exception {
List<Link> links = unmarshalResourceList(Link.class, "links.json");
assertTrue(compareJson(links, "links.json"));
}
@Test
public void testCommitDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "commit-discussions.json");
......
......@@ -14,8 +14,8 @@ import static org.mockito.Mockito.mock;
import java.util.logging.Level;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.HttpServletRequest;
import org.gitlab4j.api.systemhooks.MergeRequestSystemHookEvent;
import org.gitlab4j.api.systemhooks.ProjectSystemHookEvent;
......
......@@ -10,7 +10,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.Response.Status;
import org.gitlab4j.api.models.Project;
import org.gitlab4j.api.models.Visibility;
......
......@@ -10,7 +10,7 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Stream;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.models.AccessRequest;
......
......@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach;
......
......@@ -35,7 +35,7 @@ import java.util.List;
import java.util.Optional;
import java.util.Random;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.Constants.IssueState;
import org.gitlab4j.api.models.Duration;
......
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