Commit 0cb325a0 authored by 佳 邓's avatar 佳 邓
Browse files

change javax to jakarta

parent c81635c4
...@@ -9,19 +9,19 @@ import java.util.Locale; ...@@ -9,19 +9,19 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.ws.rs.core.EntityTag; import jakarta.ws.rs.core.EntityTag;
import javax.ws.rs.core.GenericType; import jakarta.ws.rs.core.GenericType;
import javax.ws.rs.core.Link; import jakarta.ws.rs.core.Link;
import javax.ws.rs.core.Link.Builder; import jakarta.ws.rs.core.Link.Builder;
import javax.ws.rs.core.MediaType; import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.NewCookie; import jakarta.ws.rs.core.NewCookie;
import javax.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
/** /**
* This class can be used as a concrete mock to test the individual APIs * This class can be used as a concrete mock to test the individual APIs
* getXxxxx() methods without the need to have a GitLab server available. * getXxxxx() methods without the need to have a GitLab server available.
* *
* Supports getXxxxx() methods that return a List of items, single items, * Supports getXxxxx() methods that return a List of items, single items,
* Optional items, and Pagers of items. * Optional items, and Pagers of items.
*/ */
...@@ -144,7 +144,7 @@ public class MockResponse extends Response { ...@@ -144,7 +144,7 @@ public class MockResponse extends Response {
/************************************************************************************************** /**************************************************************************************************
* The remaining methods are stubbed so we can create an instance of this class. They are simply * The remaining methods are stubbed so we can create an instance of this class. They are simply
* stubs, but needed to do this because the Mockito Spy annotation does not work without JAXB * stubs, but needed to do this because the Mockito Spy annotation does not work without JAXB
* on Java 11+ and did not wish to pull in the JAXB module even for testing. * on Java 11+ and did not wish to pull in the JAXB module even for testing.
**************************************************************************************************/ **************************************************************************************************/
@Override @Override
...@@ -235,4 +235,4 @@ public class MockResponse extends Response { ...@@ -235,4 +235,4 @@ public class MockResponse extends Response {
public MultivaluedMap<String, String> getStringHeaders() { public MultivaluedMap<String, String> getStringHeaders() {
return null; return null;
} }
} }
\ No newline at end of file
...@@ -2,8 +2,8 @@ package org.gitlab4j.api; ...@@ -2,8 +2,8 @@ package org.gitlab4j.api;
import java.io.IOException; import java.io.IOException;
import javax.servlet.ReadListener; import jakarta.servlet.ReadListener;
import javax.servlet.ServletInputStream; import jakarta.servlet.ServletInputStream;
public class MockServletInputStream extends ServletInputStream { public class MockServletInputStream extends ServletInputStream {
...@@ -64,4 +64,4 @@ public class MockServletInputStream extends ServletInputStream { ...@@ -64,4 +64,4 @@ public class MockServletInputStream extends ServletInputStream {
return -1; return -1;
} }
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; 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.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -15,7 +15,7 @@ import java.util.List; ...@@ -15,7 +15,7 @@ import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Stream; 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.Branch;
import org.gitlab4j.api.models.Comment; import org.gitlab4j.api.models.Comment;
...@@ -426,4 +426,4 @@ public class TestCommitsApi extends AbstractIntegrationTest { ...@@ -426,4 +426,4 @@ public class TestCommitsApi extends AbstractIntegrationTest {
Optional<RepositoryFile> repoFileBranchCherryPicked = gitLabApi.getRepositoryFileApi().getOptionalFile(testProject, filePath, branch.getName()); Optional<RepositoryFile> repoFileBranchCherryPicked = gitLabApi.getRepositoryFileApi().getOptionalFile(testProject, filePath, branch.getName());
assertTrue(repoFileBranchCherryPicked.isPresent()); assertTrue(repoFileBranchCherryPicked.isPresent());
} }
} }
\ No newline at end of file
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; 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.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -14,8 +14,8 @@ import static org.mockito.Mockito.mock; ...@@ -14,8 +14,8 @@ import static org.mockito.Mockito.mock;
import java.util.logging.Level; import java.util.logging.Level;
import javax.servlet.ServletInputStream; import jakarta.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import org.gitlab4j.api.systemhooks.MergeRequestSystemHookEvent; import org.gitlab4j.api.systemhooks.MergeRequestSystemHookEvent;
import org.gitlab4j.api.systemhooks.ProjectSystemHookEvent; import org.gitlab4j.api.systemhooks.ProjectSystemHookEvent;
......
...@@ -10,7 +10,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue; ...@@ -10,7 +10,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
import java.util.List; import java.util.List;
import java.util.Map; 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.Project;
import org.gitlab4j.api.models.Visibility; import org.gitlab4j.api.models.Visibility;
......
...@@ -10,7 +10,7 @@ import java.util.List; ...@@ -10,7 +10,7 @@ import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Stream; 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.AccessLevel;
import org.gitlab4j.api.models.AccessRequest; import org.gitlab4j.api.models.AccessRequest;
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; 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.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -35,7 +35,7 @@ import java.util.List; ...@@ -35,7 +35,7 @@ import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.Random; 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.Constants.IssueState;
import org.gitlab4j.api.models.Duration; import org.gitlab4j.api.models.Duration;
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; 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.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -36,7 +36,7 @@ import java.util.Map; ...@@ -36,7 +36,7 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Stream; 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.AccessLevel;
import org.gitlab4j.api.models.AccessRequest; import org.gitlab4j.api.models.AccessRequest;
......
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; 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.gitlab4j.api.models.Discussion;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -14,7 +14,7 @@ import static org.mockito.MockitoAnnotations.openMocks; ...@@ -14,7 +14,7 @@ import static org.mockito.MockitoAnnotations.openMocks;
import java.util.List; import java.util.List;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.User; import org.gitlab4j.api.models.User;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
......
...@@ -9,7 +9,7 @@ import static org.mockito.MockitoAnnotations.openMocks; ...@@ -9,7 +9,7 @@ import static org.mockito.MockitoAnnotations.openMocks;
import java.util.Collections; import java.util.Collections;
import javax.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.MultivaluedMap;
import org.gitlab4j.api.models.MergeRequest; import org.gitlab4j.api.models.MergeRequest;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
......
...@@ -15,7 +15,7 @@ import java.util.Date; ...@@ -15,7 +15,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import javax.ws.rs.core.Response; import jakarta.ws.rs.core.Response;
import org.gitlab4j.api.models.AccessLevel; import org.gitlab4j.api.models.AccessLevel;
import org.gitlab4j.api.models.Email; import org.gitlab4j.api.models.Email;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# This is the URL for the docker instance of gitlab-ce that is started for integration tests. # This is the URL for the docker instance of gitlab-ce that is started for integration tests.
# You can change this to an existing GitLab server if desired. # You can change this to an existing GitLab server if desired.
TEST_HOST_URL=http://localhost:8090 TEST_HOST_URL=http://localgit:8000
# To stop the auto-creation of access tokens, you can set these to pre-configured values # To stop the auto-creation of access tokens, you can set these to pre-configured values
# TEST_PRIVATE_TOKEN=xxxxxxxx # TEST_PRIVATE_TOKEN=xxxxxxxx
......
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