From ad0773125be4222a45dc492754a5aef706a84d39 Mon Sep 17 00:00:00 2001 From: flbruto Date: Sat, 6 Mar 2021 17:01:54 +0000 Subject: [PATCH] WIP: Java 11 upgrade --- pom.xml | 142 ++++++++++-------- .../java/emissary/client/EmissaryClient.java | 3 +- .../emissary/client/EmissaryResponse.java | 3 +- .../java/emissary/server/EmissaryServer.java | 14 +- .../emissary/server/InitializeContext.java | 5 +- src/main/java/emissary/server/api/Agents.java | 11 +- src/main/java/emissary/server/api/Env.java | 11 +- .../server/api/HealthCheckAction.java | 11 +- .../emissary/server/api/MetricsAction.java | 11 +- src/main/java/emissary/server/api/Nav.java | 11 +- src/main/java/emissary/server/api/Pause.java | 15 +- src/main/java/emissary/server/api/Peers.java | 11 +- src/main/java/emissary/server/api/Places.java | 11 +- src/main/java/emissary/server/api/Pool.java | 11 +- .../java/emissary/server/api/Shutdown.java | 15 +- .../java/emissary/server/api/Version.java | 11 +- .../server/mvc/DumpDirectoryAction.java | 15 +- .../server/mvc/EnvironmentAction.java | 9 +- .../emissary/server/mvc/NamespaceAction.java | 13 +- .../java/emissary/server/mvc/PauseAction.java | 13 +- .../emissary/server/mvc/ShutdownAction.java | 13 +- .../emissary/server/mvc/ThreadDumpAction.java | 9 +- .../server/mvc/TransferDirectoryAction.java | 13 +- .../server/mvc/adapters/DirectoryAdapter.java | 5 +- .../server/mvc/adapters/MoveToAdapter.java | 5 +- .../mvc/adapters/PlaceStarterAdapter.java | 3 +- .../server/mvc/adapters/RequestUtil.java | 3 +- .../server/mvc/adapters/WorkSpaceAdapter.java | 3 +- .../mvc/internal/AddChildDirectoryAction.java | 15 +- .../mvc/internal/CreatePlaceAction.java | 15 +- .../mvc/internal/DeregisterPlaceAction.java | 15 +- .../mvc/internal/FailDirectoryAction.java | 15 +- .../server/mvc/internal/HeartbeatAction.java | 15 +- .../server/mvc/internal/LookupAction.java | 13 +- .../server/mvc/internal/MoveToAction.java | 7 +- .../mvc/internal/RegisterPeerAction.java | 15 +- .../mvc/internal/RegisterPlaceAction.java | 17 +-- .../mvc/internal/RollOutputsAction.java | 15 +- .../internal/WorkBundleCompletedAction.java | 15 +- .../WorkSpaceClientEnqueueAction.java | 15 +- .../WorkSpaceClientOpenWorkSpaceAction.java | 15 +- .../WorkSpaceClientSpaceTakeAction.java | 15 +- .../java/emissary/command/FeedCommandIT.java | 4 +- .../java/emissary/command/RunCommandIT.java | 4 +- .../emissary/command/ServerCommandIT.java | 2 +- .../java/emissary/command/WhatCommandIT.java | 2 +- .../java/emissary/config/ConfigUtilTest.java | 1 + .../directory/HeartbeatManagerTest.java | 3 +- .../java/emissary/server/api/AgentsTest.java | 3 +- .../java/emissary/server/api/PeersIT.java | 3 +- .../java/emissary/server/api/PlacesTest.java | 3 +- .../emissary/server/mvc/EndpointTestBase.java | 3 +- .../mvc/internal/CreatePlaceActionTest.java | 7 +- .../internal/DeregisterPlaceActionTest.java | 7 +- .../mvc/internal/FailDirectoryActionTest.java | 7 +- .../mvc/internal/HeartbeatActionTest.java | 7 +- .../server/mvc/internal/LookupActionTest.java | 3 +- .../mvc/internal/RegisterPeerActionTest.java | 7 +- .../mvc/internal/RegisterPlaceActionTest.java | 3 +- .../WorkBundleCompletedActionTest.java | 7 +- .../WorkSpaceClientSpaceTakeActionTest.java | 9 +- 61 files changed, 321 insertions(+), 366 deletions(-) diff --git a/pom.xml b/pom.xml index f2f25773b3..6e28144bb3 100644 --- a/pom.xml +++ b/pom.xml @@ -33,41 +33,43 @@ 4.4 1.3 1.4 - 2.4 + 2.8.0 2.6 1.2 1.6 3.1.0 - 30.0-jre + 30.1.1-jre 2.0.0.0 - 4.5.1 - 4.4.3 - 2.12.1 + 4.5.13 + 4.4.14 + 2.12.2 1.3.2 + 3.0.0 1.58 2.0.2 - 2.32 - 9.4.37.v20210219 - 5.5.2 - 1.5.2 - 1.2.3 - 3.0.0-M3 - 1.10.19 + 3.0.1 + 11.0.1 + 5.8.0-M1 + 1.8.0-M1 + 1.3.0-alpha5 + 3.0.0-M5 + 3.8.0 2.0.8 - 1.7R4 - 1.7.29 + 1.7.13 + 2.0.0-alpha1 0.9.7 - 2.11.4 - 1.22 + 2.12.3 + 1.24 4.5.3 - 3.5.1 - 2.5.2 + 3.6.0 + 2.5.4 2.6.0 ${project.basedir}/contrib/formatter.xml + 11 true - 1.8 - 1.8 + 11 + 11 2.8.1 3.3.9 UTF-8 @@ -125,6 +127,11 @@ guava ${dep.guava.version} + + com.sun.activation + jakarta.activation + 2.0.0 + commons-cli commons-cli @@ -185,6 +192,16 @@ metrics-servlets ${dep.dropwizard.metrics.version} + + jakarta.servlet + jakarta.servlet-api + 5.0.0 + + + jakarta.xml.bind + jakarta.xml.bind-api + ${dep.jaxb.runtime.version} + javax.annotation javax.annotation-api @@ -274,6 +291,11 @@ jetty-xml ${dep.jetty.version} + + org.glassfish.jaxb + jaxb-runtime + ${dep.jaxb.runtime.version} + org.glassfish.jersey.containers jersey-container-jetty-http @@ -298,12 +320,6 @@ org.glassfish.jersey.ext jersey-mvc ${dep.jersey.version} - - - javax.servlet - servlet-api - - org.glassfish.jersey.ext @@ -311,14 +327,9 @@ ${dep.jersey.version} - com.github.spullara.mustache.java compiler - - javax.servlet - servlet-api - @@ -415,15 +426,9 @@ org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-jetty + jersey-test-framework-provider-simple ${dep.jersey.version} test - - - javax.servlet - javax.servlet-api - - org.hamcrest @@ -433,7 +438,7 @@ org.mockito - mockito-all + mockito-core ${dep.mockito-all.version} test @@ -510,6 +515,10 @@ io.dropwizard.metrics metrics-servlets + + jakarta.xml.bind + jakarta.xml.bind-api + net.spy spymemcached @@ -562,6 +571,10 @@ org.eclipse.jetty jetty-xml + + org.glassfish.jaxb + jaxb-runtime + org.glassfish.jersey.containers jersey-container-jetty-http @@ -636,17 +649,23 @@ org.glassfish.jersey.test-framework.providers - jersey-test-framework-provider-jetty + jersey-test-framework-provider-simple test org.hamcrest hamcrest-junit test + + + junit + junit + + org.mockito - mockito-all + mockito-core test @@ -713,12 +732,12 @@ com.github.ekryd.sortpom sortpom-maven-plugin - 2.10.0 + 2.12.0 org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M2 + 3.0.0-M3 check-maven-version @@ -731,7 +750,7 @@ [${maven.min-version},) - [1.8,) + [11,) @@ -742,7 +761,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.1.0 + 3.2.0 ${*} @@ -755,7 +774,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.2.1 attach-sources @@ -779,7 +798,7 @@ org.apache.maven.plugins maven-site-plugin - 3.8.2 + 3.9.1 true false @@ -804,7 +823,7 @@ com.puppycrawl.tools checkstyle - 8.36.2 + 8.41 @@ -819,7 +838,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 true
Generated ${maven.build.timestamp}
@@ -838,7 +857,7 @@ org.apache.maven.plugins maven-release-plugin - 2.5.3 + 3.0.0-M1 true true @@ -850,17 +869,17 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.2.0 org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.2.0 org.codehaus.mojo versions-maven-plugin - 2.7 + 2.8.1 org.apache.maven.plugins @@ -871,6 +890,7 @@ -Xlint:-path,unchecked + ${maven.compiler.release} @@ -884,12 +904,12 @@ org.apache.maven.plugins maven-assembly-plugin - 3.1.1 + 3.3.0 net.revelc.code.formatter formatter-maven-plugin - 2.11.0 + 2.13.0 ${maven.compiler.source} ${maven.compiler.source} @@ -916,7 +936,7 @@ net.revelc.code impsort-maven-plugin - 1.3.2 + 1.4.1 java.,javax.,* true @@ -933,7 +953,7 @@ org.jacoco jacoco-maven-plugin - 0.8.4 + 0.8.6 default-prepare-agent @@ -977,7 +997,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.12.0 + 3.13.0 false @@ -997,7 +1017,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 false false @@ -1391,7 +1411,7 @@ NOTE this requires the use of a Java 8 compiler. For example: - $ JAVA_HOME=/path/to/jdk1.8.0 mvn -PerrorProne clean test-compile + $ JAVA_HOME=/path/to/jdk_11 mvn -PerrorProne clean test-compile will analyze the main and test code, with the analyzer's report given as compiler error/warning/note messages. --> @@ -1610,7 +1630,7 @@ [9,) - 8 + 11 diff --git a/src/main/java/emissary/client/EmissaryClient.java b/src/main/java/emissary/client/EmissaryClient.java index 7a06aac114..01278ca0a1 100644 --- a/src/main/java/emissary/client/EmissaryClient.java +++ b/src/main/java/emissary/client/EmissaryClient.java @@ -4,11 +4,10 @@ import java.util.Properties; import java.util.concurrent.TimeUnit; -import javax.ws.rs.core.MediaType; - import com.google.common.annotations.VisibleForTesting; import emissary.config.ConfigUtil; import emissary.config.Configurator; +import jakarta.ws.rs.core.MediaType; import org.apache.http.HttpEntity; import org.apache.http.auth.AuthScope; import org.apache.http.auth.Credentials; diff --git a/src/main/java/emissary/client/EmissaryResponse.java b/src/main/java/emissary/client/EmissaryResponse.java index e30d5a9210..7e48587f7c 100644 --- a/src/main/java/emissary/client/EmissaryResponse.java +++ b/src/main/java/emissary/client/EmissaryResponse.java @@ -3,10 +3,9 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; -import javax.ws.rs.core.MediaType; - import com.fasterxml.jackson.databind.ObjectMapper; import emissary.client.response.BaseEntity; +import jakarta.ws.rs.core.MediaType; import org.apache.commons.io.IOUtils; import org.apache.http.Header; import org.apache.http.HttpEntity; diff --git a/src/main/java/emissary/server/EmissaryServer.java b/src/main/java/emissary/server/EmissaryServer.java index c1e6774cac..2462dadb85 100644 --- a/src/main/java/emissary/server/EmissaryServer.java +++ b/src/main/java/emissary/server/EmissaryServer.java @@ -19,7 +19,6 @@ import javax.naming.directory.AttributeInUseException; -import ch.qos.logback.classic.ViewStatusMessagesServlet; import com.google.common.annotations.VisibleForTesting; import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; @@ -129,8 +128,6 @@ public Server startServer() { // TODO: rework this, no need for it be set with a context path but if this // is left out, it matches / and nothing works correctly emissaryHandler.setContextPath("/idontreallyservecontentnowdoi"); - ContextHandler lbConfigHandler = buildLogbackConfigHandler(); - lbConfigHandler.setContextPath("/lbConfig"); ContextHandler apiHandler = buildApiHandler(); apiHandler.setContextPath("/api"); ContextHandler mvcHandler = buildMVCHandler(); @@ -145,7 +142,6 @@ public Server startServer() { // secure some of the contexts final HandlerList securedHandlers = new HandlerList(); - securedHandlers.addHandler(lbConfigHandler); securedHandlers.addHandler(apiHandler); securedHandlers.addHandler(mvcHandler); securedHandlers.addHandler(staticHandler); @@ -595,14 +591,6 @@ private ContextHandler buildEmissaryHandler() throws EmissaryException { return emissaryHolderContext; } - private ContextHandler buildLogbackConfigHandler() { - ServletHolder lbHolder = new ServletHolder("logback-config-holder", ViewStatusMessagesServlet.class); - ServletContextHandler lbHolderContext = new ServletContextHandler(ServletContextHandler.SESSIONS); - lbHolderContext.addServlet(lbHolder, "/*"); - - return lbHolderContext; - } - @VisibleForTesting protected Server configureServer() throws IOException, GeneralSecurityException { int maxThreads = 250; @@ -647,7 +635,7 @@ private ServerConnector getServerConnector(Server server) throws IOException, Ke String trustStorePass = httpConnFactCfg.findStringEntry("javax.net.ssl.trustStorePassword", keystorePass); System.setProperty("javax.net.ssl.trustStorePassword", trustStorePass); // setup context to add to connector - SslContextFactory sslContextFactory = new SslContextFactory.Server(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setKeyStorePath(keystore); sslContextFactory.setKeyStorePassword(keystorePass); KeyStore trustStoreInstance = KeyStore.getInstance("JKS"); diff --git a/src/main/java/emissary/server/InitializeContext.java b/src/main/java/emissary/server/InitializeContext.java index 7cf00ec200..71602e9ba2 100644 --- a/src/main/java/emissary/server/InitializeContext.java +++ b/src/main/java/emissary/server/InitializeContext.java @@ -1,9 +1,8 @@ package emissary.server; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - import emissary.directory.EmissaryNode; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Agents.java b/src/main/java/emissary/server/api/Agents.java index a517d62288..963b4131e1 100644 --- a/src/main/java/emissary/server/api/Agents.java +++ b/src/main/java/emissary/server/api/Agents.java @@ -3,12 +3,6 @@ import static emissary.server.api.ApiUtils.lookupPeers; import static emissary.server.api.ApiUtils.stripPeerString; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.EmissaryClient; import emissary.client.response.AgentList; import emissary.client.response.AgentsResponseEntity; @@ -18,6 +12,11 @@ import emissary.directory.EmissaryNode; import emissary.pool.MobileAgentFactory; import emissary.server.EmissaryServer; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.http.client.methods.HttpGet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Env.java b/src/main/java/emissary/server/api/Env.java index cd277f187e..e3106c174e 100644 --- a/src/main/java/emissary/server/api/Env.java +++ b/src/main/java/emissary/server/api/Env.java @@ -2,17 +2,16 @@ import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.response.MapResponseEntity; import emissary.command.ServerCommand; import emissary.core.Namespace; import emissary.core.NamespaceException; import emissary.server.EmissaryServer; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/HealthCheckAction.java b/src/main/java/emissary/server/api/HealthCheckAction.java index 6924b9c9f2..842f0254c0 100644 --- a/src/main/java/emissary/server/api/HealthCheckAction.java +++ b/src/main/java/emissary/server/api/HealthCheckAction.java @@ -1,13 +1,12 @@ package emissary.server.api; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.MetricsManager; import emissary.core.NamespaceException; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/MetricsAction.java b/src/main/java/emissary/server/api/MetricsAction.java index 7cfdb6d08b..f7ffb01ff0 100644 --- a/src/main/java/emissary/server/api/MetricsAction.java +++ b/src/main/java/emissary/server/api/MetricsAction.java @@ -1,13 +1,12 @@ package emissary.server.api; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.MetricsManager; import emissary.core.NamespaceException; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Nav.java b/src/main/java/emissary/server/api/Nav.java index 43643d6951..61e9929330 100644 --- a/src/main/java/emissary/server/api/Nav.java +++ b/src/main/java/emissary/server/api/Nav.java @@ -3,14 +3,13 @@ import java.io.IOException; import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.config.ConfigUtil; import emissary.config.Configurator; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("") // context is /api diff --git a/src/main/java/emissary/server/api/Pause.java b/src/main/java/emissary/server/api/Pause.java index 7acaf78c0a..243531718c 100644 --- a/src/main/java/emissary/server/api/Pause.java +++ b/src/main/java/emissary/server/api/Pause.java @@ -1,15 +1,14 @@ package emissary.server.api; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.NamespaceException; import emissary.server.EmissaryServer; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("") // context is api diff --git a/src/main/java/emissary/server/api/Peers.java b/src/main/java/emissary/server/api/Peers.java index a8ee140c0a..8f0b767c36 100644 --- a/src/main/java/emissary/server/api/Peers.java +++ b/src/main/java/emissary/server/api/Peers.java @@ -6,16 +6,15 @@ import java.util.Set; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.EmissaryClient; import emissary.client.response.PeerList; import emissary.client.response.PeersResponseEntity; import emissary.core.EmissaryException; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.http.client.methods.HttpGet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Places.java b/src/main/java/emissary/server/api/Places.java index a8be731a11..bb8b08f208 100644 --- a/src/main/java/emissary/server/api/Places.java +++ b/src/main/java/emissary/server/api/Places.java @@ -5,12 +5,6 @@ import java.util.Set; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.EmissaryClient; import emissary.client.response.PlaceList; import emissary.client.response.PlacesResponseEntity; @@ -18,6 +12,11 @@ import emissary.core.Namespace; import emissary.directory.EmissaryNode; import emissary.server.EmissaryServer; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.http.client.methods.HttpGet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Pool.java b/src/main/java/emissary/server/api/Pool.java index 236d187f84..52cee678d3 100644 --- a/src/main/java/emissary/server/api/Pool.java +++ b/src/main/java/emissary/server/api/Pool.java @@ -3,12 +3,6 @@ import static emissary.server.api.ApiUtils.lookupPeers; import static emissary.server.api.ApiUtils.stripPeerString; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.EmissaryClient; import emissary.client.response.MapResponseEntity; import emissary.core.EmissaryException; @@ -18,6 +12,11 @@ import emissary.pool.AgentPool; import emissary.pool.MobileAgentFactory; import emissary.server.EmissaryServer; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.http.client.methods.HttpGet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Shutdown.java b/src/main/java/emissary/server/api/Shutdown.java index ae7abdd76a..835748a34d 100644 --- a/src/main/java/emissary/server/api/Shutdown.java +++ b/src/main/java/emissary/server/api/Shutdown.java @@ -1,14 +1,13 @@ package emissary.server.api; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.server.EmissaryServer; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/api/Version.java b/src/main/java/emissary/server/api/Version.java index bcb90825c2..0dfa4738f8 100644 --- a/src/main/java/emissary/server/api/Version.java +++ b/src/main/java/emissary/server/api/Version.java @@ -5,12 +5,6 @@ import java.util.Set; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.client.EmissaryClient; import emissary.client.response.MapResponseEntity; import emissary.core.EmissaryException; @@ -18,6 +12,11 @@ import emissary.core.NamespaceException; import emissary.directory.EmissaryNode; import emissary.server.EmissaryServer; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.http.client.methods.HttpGet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/DumpDirectoryAction.java b/src/main/java/emissary/server/mvc/DumpDirectoryAction.java index 1f3b1dabd3..0694872560 100644 --- a/src/main/java/emissary/server/mvc/DumpDirectoryAction.java +++ b/src/main/java/emissary/server/mvc/DumpDirectoryAction.java @@ -6,14 +6,6 @@ import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; - import emissary.core.EmissaryException; import emissary.core.Namespace; import emissary.core.NamespaceException; @@ -22,6 +14,13 @@ import emissary.directory.IDirectoryPlace; import emissary.directory.KeyManipulator; import emissary.server.mvc.adapters.DirectoryAdapter; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/EnvironmentAction.java b/src/main/java/emissary/server/mvc/EnvironmentAction.java index c8c539933e..c8f8d68b11 100644 --- a/src/main/java/emissary/server/mvc/EnvironmentAction.java +++ b/src/main/java/emissary/server/mvc/EnvironmentAction.java @@ -6,11 +6,10 @@ import java.util.Set; import java.util.TreeSet; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; @Path("") diff --git a/src/main/java/emissary/server/mvc/NamespaceAction.java b/src/main/java/emissary/server/mvc/NamespaceAction.java index 4be255b7fe..4433a3f2cd 100644 --- a/src/main/java/emissary/server/mvc/NamespaceAction.java +++ b/src/main/java/emissary/server/mvc/NamespaceAction.java @@ -6,15 +6,14 @@ import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; - import emissary.core.Namespace; import emissary.core.NamespaceException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; @Path("") diff --git a/src/main/java/emissary/server/mvc/PauseAction.java b/src/main/java/emissary/server/mvc/PauseAction.java index 4d124d0f8b..48e0802858 100644 --- a/src/main/java/emissary/server/mvc/PauseAction.java +++ b/src/main/java/emissary/server/mvc/PauseAction.java @@ -3,13 +3,12 @@ import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; - +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; @Path("") diff --git a/src/main/java/emissary/server/mvc/ShutdownAction.java b/src/main/java/emissary/server/mvc/ShutdownAction.java index f0f800cf7b..314f778432 100644 --- a/src/main/java/emissary/server/mvc/ShutdownAction.java +++ b/src/main/java/emissary/server/mvc/ShutdownAction.java @@ -3,13 +3,12 @@ import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; - +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; @Path("") diff --git a/src/main/java/emissary/server/mvc/ThreadDumpAction.java b/src/main/java/emissary/server/mvc/ThreadDumpAction.java index ec5205aee0..7dbf832459 100644 --- a/src/main/java/emissary/server/mvc/ThreadDumpAction.java +++ b/src/main/java/emissary/server/mvc/ThreadDumpAction.java @@ -8,11 +8,10 @@ import java.util.Map; import java.util.Set; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.glassfish.jersey.server.mvc.Template; @Path("") diff --git a/src/main/java/emissary/server/mvc/TransferDirectoryAction.java b/src/main/java/emissary/server/mvc/TransferDirectoryAction.java index 7992b23526..2d52546637 100644 --- a/src/main/java/emissary/server/mvc/TransferDirectoryAction.java +++ b/src/main/java/emissary/server/mvc/TransferDirectoryAction.java @@ -1,17 +1,16 @@ package emissary.server.mvc; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.EmissaryException; import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.DirectoryXmlContainer; import emissary.directory.IDirectoryPlace; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/adapters/DirectoryAdapter.java b/src/main/java/emissary/server/mvc/adapters/DirectoryAdapter.java index 56b0d74e56..4c58f52f7a 100755 --- a/src/main/java/emissary/server/mvc/adapters/DirectoryAdapter.java +++ b/src/main/java/emissary/server/mvc/adapters/DirectoryAdapter.java @@ -7,9 +7,6 @@ import java.util.List; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.MediaType; - import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; import emissary.config.ConfigUtil; @@ -21,6 +18,8 @@ import emissary.directory.IRemoteDirectory; import emissary.directory.KeyManipulator; import emissary.log.MDCConstants; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.MediaType; import org.apache.http.HttpStatus; import org.apache.http.HttpVersion; import org.apache.http.NameValuePair; diff --git a/src/main/java/emissary/server/mvc/adapters/MoveToAdapter.java b/src/main/java/emissary/server/mvc/adapters/MoveToAdapter.java index 63ebd7dd09..ff8cbcd6bc 100755 --- a/src/main/java/emissary/server/mvc/adapters/MoveToAdapter.java +++ b/src/main/java/emissary/server/mvc/adapters/MoveToAdapter.java @@ -7,9 +7,6 @@ import java.util.Collections; import java.util.List; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.MediaType; - import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; import emissary.config.ConfigUtil; @@ -24,6 +21,8 @@ import emissary.place.IServiceProviderPlace; import emissary.pool.AgentPool; import emissary.util.PayloadUtil; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.MediaType; import org.apache.http.HttpStatus; import org.apache.http.HttpVersion; import org.apache.http.NameValuePair; diff --git a/src/main/java/emissary/server/mvc/adapters/PlaceStarterAdapter.java b/src/main/java/emissary/server/mvc/adapters/PlaceStarterAdapter.java index abb675a7aa..734f594ec0 100755 --- a/src/main/java/emissary/server/mvc/adapters/PlaceStarterAdapter.java +++ b/src/main/java/emissary/server/mvc/adapters/PlaceStarterAdapter.java @@ -3,12 +3,11 @@ import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletRequest; - import emissary.admin.PlaceStarter; import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; import emissary.place.IServiceProviderPlace; +import jakarta.servlet.http.HttpServletRequest; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; diff --git a/src/main/java/emissary/server/mvc/adapters/RequestUtil.java b/src/main/java/emissary/server/mvc/adapters/RequestUtil.java index 8df57c393b..a1aea8454b 100755 --- a/src/main/java/emissary/server/mvc/adapters/RequestUtil.java +++ b/src/main/java/emissary/server/mvc/adapters/RequestUtil.java @@ -1,7 +1,6 @@ package emissary.server.mvc.adapters; -import javax.servlet.ServletRequest; - +import jakarta.servlet.ServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java b/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java index dc46a65b85..61f0a6a12a 100755 --- a/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java +++ b/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java @@ -8,8 +8,6 @@ import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletRequest; - import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; import emissary.core.Namespace; @@ -18,6 +16,7 @@ import emissary.pickup.IPickUpSpace; import emissary.pickup.WorkBundle; import emissary.pickup.WorkSpace; +import jakarta.servlet.http.HttpServletRequest; import org.apache.http.HttpStatus; import org.apache.http.NameValuePair; import org.apache.http.client.config.RequestConfig; diff --git a/src/main/java/emissary/server/mvc/internal/AddChildDirectoryAction.java b/src/main/java/emissary/server/mvc/internal/AddChildDirectoryAction.java index 1d6945fac5..941d16c361 100644 --- a/src/main/java/emissary/server/mvc/internal/AddChildDirectoryAction.java +++ b/src/main/java/emissary/server/mvc/internal/AddChildDirectoryAction.java @@ -1,17 +1,16 @@ package emissary.server.mvc.internal; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.directory.IRemoteDirectory; import emissary.directory.KeyManipulator; import emissary.log.MDCConstants; import emissary.server.mvc.adapters.DirectoryAdapter; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; diff --git a/src/main/java/emissary/server/mvc/internal/CreatePlaceAction.java b/src/main/java/emissary/server/mvc/internal/CreatePlaceAction.java index 7c547d7ed4..a2b09717a6 100644 --- a/src/main/java/emissary/server/mvc/internal/CreatePlaceAction.java +++ b/src/main/java/emissary/server/mvc/internal/CreatePlaceAction.java @@ -4,16 +4,15 @@ import static emissary.server.mvc.adapters.PlaceStarterAdapter.CP_DIRECTORY; import static emissary.server.mvc.adapters.PlaceStarterAdapter.CP_LOCATION; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.admin.PlaceStarter; import emissary.place.IServiceProviderPlace; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/DeregisterPlaceAction.java b/src/main/java/emissary/server/mvc/internal/DeregisterPlaceAction.java index 169cec7eb1..65e71ae0a1 100644 --- a/src/main/java/emissary/server/mvc/internal/DeregisterPlaceAction.java +++ b/src/main/java/emissary/server/mvc/internal/DeregisterPlaceAction.java @@ -5,17 +5,16 @@ import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.directory.IRemoteDirectory; import emissary.directory.KeyManipulator; import emissary.log.MDCConstants; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/FailDirectoryAction.java b/src/main/java/emissary/server/mvc/internal/FailDirectoryAction.java index 4a57427b55..ddc3c92f27 100644 --- a/src/main/java/emissary/server/mvc/internal/FailDirectoryAction.java +++ b/src/main/java/emissary/server/mvc/internal/FailDirectoryAction.java @@ -5,17 +5,16 @@ import static emissary.server.mvc.adapters.DirectoryAdapter.FAILED_DIRECTORY_NAME; import static emissary.server.mvc.adapters.DirectoryAdapter.TARGET_DIRECTORY; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.directory.IRemoteDirectory; import emissary.directory.KeyManipulator; import emissary.log.MDCConstants; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/HeartbeatAction.java b/src/main/java/emissary/server/mvc/internal/HeartbeatAction.java index 909e754e8a..b36bcf99de 100644 --- a/src/main/java/emissary/server/mvc/internal/HeartbeatAction.java +++ b/src/main/java/emissary/server/mvc/internal/HeartbeatAction.java @@ -1,18 +1,17 @@ package emissary.server.mvc.internal; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.NamespaceException; import emissary.directory.IDirectoryPlace; import emissary.place.IServiceProviderPlace; import emissary.server.mvc.NamespaceAction; import emissary.server.mvc.adapters.HeartbeatAdapter; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/LookupAction.java b/src/main/java/emissary/server/mvc/internal/LookupAction.java index b174d7d6d8..9ab6b73db2 100644 --- a/src/main/java/emissary/server/mvc/internal/LookupAction.java +++ b/src/main/java/emissary/server/mvc/internal/LookupAction.java @@ -1,14 +1,13 @@ package emissary.server.mvc.internal; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.core.NamespaceException; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/MoveToAction.java b/src/main/java/emissary/server/mvc/internal/MoveToAction.java index 6966f48539..729a720e3b 100644 --- a/src/main/java/emissary/server/mvc/internal/MoveToAction.java +++ b/src/main/java/emissary/server/mvc/internal/MoveToAction.java @@ -1,10 +1,9 @@ package emissary.server.mvc.internal; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.Response; - import emissary.server.mvc.adapters.MoveToAdapter; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java b/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java index e752559ba0..56c031325c 100644 --- a/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java +++ b/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java @@ -6,18 +6,17 @@ import java.util.HashSet; import java.util.Set; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.directory.DirectoryXmlContainer; import emissary.directory.IRemoteDirectory; import emissary.directory.KeyManipulator; import emissary.log.MDCConstants; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/RegisterPlaceAction.java b/src/main/java/emissary/server/mvc/internal/RegisterPlaceAction.java index 6c4f28f294..5ed6b8acc0 100644 --- a/src/main/java/emissary/server/mvc/internal/RegisterPlaceAction.java +++ b/src/main/java/emissary/server/mvc/internal/RegisterPlaceAction.java @@ -2,16 +2,15 @@ import static emissary.server.mvc.adapters.DirectoryAdapter.TARGET_DIRECTORY; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.server.mvc.adapters.DirectoryAdapter; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/RollOutputsAction.java b/src/main/java/emissary/server/mvc/internal/RollOutputsAction.java index 6e27e459b1..e16bda8083 100644 --- a/src/main/java/emissary/server/mvc/internal/RollOutputsAction.java +++ b/src/main/java/emissary/server/mvc/internal/RollOutputsAction.java @@ -4,18 +4,17 @@ import java.util.List; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.core.ResourceWatcher; import emissary.output.DropOffPlace; import emissary.output.filter.IDropOffFilter; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("") // context is /emissary, set in EmissaryServer diff --git a/src/main/java/emissary/server/mvc/internal/WorkBundleCompletedAction.java b/src/main/java/emissary/server/mvc/internal/WorkBundleCompletedAction.java index b65e1aed18..2af0321049 100644 --- a/src/main/java/emissary/server/mvc/internal/WorkBundleCompletedAction.java +++ b/src/main/java/emissary/server/mvc/internal/WorkBundleCompletedAction.java @@ -5,17 +5,16 @@ import static emissary.server.mvc.adapters.WorkSpaceAdapter.WORK_BUNDLE_ID; import static emissary.server.mvc.adapters.WorkSpaceAdapter.WORK_BUNDLE_STATUS; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.core.NamespaceException; import emissary.pickup.WorkSpace; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java index 0fd3371962..49af54ca56 100644 --- a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java +++ b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientEnqueueAction.java @@ -3,19 +3,18 @@ import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.directory.KeyManipulator; import emissary.pickup.IPickUpSpace; import emissary.pickup.WorkBundle; import emissary.server.mvc.adapters.WorkSpaceAdapter; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientOpenWorkSpaceAction.java b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientOpenWorkSpaceAction.java index 3fd5f3f267..8401a8cc67 100644 --- a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientOpenWorkSpaceAction.java +++ b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientOpenWorkSpaceAction.java @@ -3,17 +3,16 @@ import static emissary.server.mvc.adapters.WorkSpaceAdapter.CLIENT_NAME; import static emissary.server.mvc.adapters.WorkSpaceAdapter.SPACE_NAME; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.core.NamespaceException; import emissary.pickup.IPickUpSpace; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeAction.java b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeAction.java index 7e22f7de27..e637c2d2d7 100644 --- a/src/main/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeAction.java +++ b/src/main/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeAction.java @@ -1,17 +1,16 @@ package emissary.server.mvc.internal; -import javax.ws.rs.Consumes; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - import emissary.core.EmissaryException; import emissary.core.Namespace; import emissary.pickup.WorkBundle; import emissary.pickup.WorkSpace; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/test/java/emissary/command/FeedCommandIT.java b/src/test/java/emissary/command/FeedCommandIT.java index 4747216ab3..87f988177c 100644 --- a/src/test/java/emissary/command/FeedCommandIT.java +++ b/src/test/java/emissary/command/FeedCommandIT.java @@ -1,7 +1,7 @@ package emissary.command; +import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; import java.io.IOException; import java.nio.file.Files; @@ -17,7 +17,6 @@ import emissary.test.core.UnitTest; import emissary.util.io.UnitTestFileUtils; import org.hamcrest.core.StringEndsWith; -import org.hamcrest.junit.ExpectedException; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -26,6 +25,7 @@ import org.junit.experimental.theories.FromDataPoints; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; @RunWith(Theories.class) diff --git a/src/test/java/emissary/command/RunCommandIT.java b/src/test/java/emissary/command/RunCommandIT.java index f404ddb03a..778218f983 100644 --- a/src/test/java/emissary/command/RunCommandIT.java +++ b/src/test/java/emissary/command/RunCommandIT.java @@ -1,7 +1,7 @@ package emissary.command; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.junit.MatcherAssert.assertThat; import static org.junit.Assert.fail; import java.io.ByteArrayOutputStream; diff --git a/src/test/java/emissary/command/ServerCommandIT.java b/src/test/java/emissary/command/ServerCommandIT.java index 921bb57547..8043a80129 100644 --- a/src/test/java/emissary/command/ServerCommandIT.java +++ b/src/test/java/emissary/command/ServerCommandIT.java @@ -1,7 +1,7 @@ package emissary.command; +import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.fail; import java.nio.file.Paths; diff --git a/src/test/java/emissary/command/WhatCommandIT.java b/src/test/java/emissary/command/WhatCommandIT.java index c82b664e79..ad57c7c379 100644 --- a/src/test/java/emissary/command/WhatCommandIT.java +++ b/src/test/java/emissary/command/WhatCommandIT.java @@ -14,7 +14,6 @@ import emissary.config.ConfigUtil; import emissary.test.core.UnitTest; import emissary.util.io.UnitTestFileUtils; -import org.hamcrest.junit.ExpectedException; import org.junit.After; import org.junit.Before; import org.junit.Rule; @@ -23,6 +22,7 @@ import org.junit.experimental.theories.FromDataPoints; import org.junit.experimental.theories.Theories; import org.junit.experimental.theories.Theory; +import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; @RunWith(Theories.class) diff --git a/src/test/java/emissary/config/ConfigUtilTest.java b/src/test/java/emissary/config/ConfigUtilTest.java index 0077bcf775..e20b8a8d16 100644 --- a/src/test/java/emissary/config/ConfigUtilTest.java +++ b/src/test/java/emissary/config/ConfigUtilTest.java @@ -529,6 +529,7 @@ public void testMultipleMasterClassNamesMultipleDirs() throws IOException, Emiss } @Test + @Ignore public void testMasterClassNamesWarnsOnFlavor() throws IOException, EmissaryException { // final String contents = "DevNullPlace = \"emissary.place.sample.DevNullPlace\"\n"; // createFileAndPopulate(CDIR, "emissary.admin.MasterClassNames.cfg", contents); diff --git a/src/test/java/emissary/directory/HeartbeatManagerTest.java b/src/test/java/emissary/directory/HeartbeatManagerTest.java index 7ed3ec4b27..94b028a43e 100644 --- a/src/test/java/emissary/directory/HeartbeatManagerTest.java +++ b/src/test/java/emissary/directory/HeartbeatManagerTest.java @@ -9,11 +9,10 @@ import java.io.IOException; -import javax.ws.rs.core.MediaType; - import emissary.client.EmissaryClient; import emissary.client.EmissaryResponse; import emissary.test.core.UnitTest; +import jakarta.ws.rs.core.MediaType; import org.apache.commons.io.IOUtils; import org.apache.http.Header; import org.apache.http.HttpEntity; diff --git a/src/test/java/emissary/server/api/AgentsTest.java b/src/test/java/emissary/server/api/AgentsTest.java index 0fb516e52f..2d13c02c53 100644 --- a/src/test/java/emissary/server/api/AgentsTest.java +++ b/src/test/java/emissary/server/api/AgentsTest.java @@ -7,8 +7,6 @@ import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; -import javax.ws.rs.core.Response; - import emissary.client.response.AgentsResponseEntity; import emissary.core.Namespace; import emissary.directory.EmissaryNode; @@ -16,6 +14,7 @@ import emissary.pool.MobileAgentFactory; import emissary.server.EmissaryServer; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.core.Response; import org.hamcrest.collection.IsEmptyCollection; import org.hamcrest.collection.IsIterableContainingInOrder; import org.junit.After; diff --git a/src/test/java/emissary/server/api/PeersIT.java b/src/test/java/emissary/server/api/PeersIT.java index b9cdc67b09..950e62a0c9 100644 --- a/src/test/java/emissary/server/api/PeersIT.java +++ b/src/test/java/emissary/server/api/PeersIT.java @@ -8,8 +8,6 @@ import java.util.HashSet; import java.util.Set; -import javax.ws.rs.core.Response; - import emissary.client.response.PeersResponseEntity; import emissary.command.ServerCommand; import emissary.config.ConfigUtil; @@ -20,6 +18,7 @@ import emissary.directory.EmissaryNode; import emissary.server.EmissaryServer; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.core.Response; import org.hamcrest.collection.IsEmptyCollection; import org.hamcrest.collection.IsIterableWithSize; import org.hamcrest.junit.ExpectedException; diff --git a/src/test/java/emissary/server/api/PlacesTest.java b/src/test/java/emissary/server/api/PlacesTest.java index 8bda00613f..c127335e19 100644 --- a/src/test/java/emissary/server/api/PlacesTest.java +++ b/src/test/java/emissary/server/api/PlacesTest.java @@ -7,8 +7,6 @@ import java.util.HashSet; import java.util.Set; -import javax.ws.rs.core.Response; - import emissary.client.response.PlacesResponseEntity; import emissary.command.ServerCommand; import emissary.core.EmissaryException; @@ -16,6 +14,7 @@ import emissary.directory.EmissaryNode; import emissary.server.EmissaryServer; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.core.Response; import org.hamcrest.collection.IsIterableWithSize; import org.junit.After; import org.junit.Before; diff --git a/src/test/java/emissary/server/mvc/EndpointTestBase.java b/src/test/java/emissary/server/mvc/EndpointTestBase.java index e1980c7595..5d11fb27c8 100644 --- a/src/test/java/emissary/server/mvc/EndpointTestBase.java +++ b/src/test/java/emissary/server/mvc/EndpointTestBase.java @@ -1,9 +1,8 @@ package emissary.server.mvc; -import javax.ws.rs.core.Application; - import emissary.core.Namespace; import emissary.test.core.UnitTest; +import jakarta.ws.rs.core.Application; import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.mvc.mustache.MustacheMvcFeature; diff --git a/src/test/java/emissary/server/mvc/internal/CreatePlaceActionTest.java b/src/test/java/emissary/server/mvc/internal/CreatePlaceActionTest.java index 92e8d40b8f..9bba725093 100644 --- a/src/test/java/emissary/server/mvc/internal/CreatePlaceActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/CreatePlaceActionTest.java @@ -9,11 +9,10 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import org.junit.experimental.theories.DataPoints; diff --git a/src/test/java/emissary/server/mvc/internal/DeregisterPlaceActionTest.java b/src/test/java/emissary/server/mvc/internal/DeregisterPlaceActionTest.java index 4cec9b18cc..8fc3ff0eb1 100644 --- a/src/test/java/emissary/server/mvc/internal/DeregisterPlaceActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/DeregisterPlaceActionTest.java @@ -7,15 +7,14 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; import emissary.server.mvc.EndpointTestBase; import emissary.util.io.ResourceReader; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/FailDirectoryActionTest.java b/src/test/java/emissary/server/mvc/internal/FailDirectoryActionTest.java index 842546b9e2..afec9e4d1b 100644 --- a/src/test/java/emissary/server/mvc/internal/FailDirectoryActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/FailDirectoryActionTest.java @@ -11,16 +11,15 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import com.google.common.collect.Sets; import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; import emissary.server.mvc.EndpointTestBase; import emissary.util.io.ResourceReader; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java b/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java index 6421d9a3a7..e058118af4 100644 --- a/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java @@ -7,14 +7,13 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.server.mvc.EndpointTestBase; import emissary.server.mvc.adapters.HeartbeatAdapter; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.hamcrest.core.StringStartsWith; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/LookupActionTest.java b/src/test/java/emissary/server/mvc/internal/LookupActionTest.java index 797ec2cb06..0583ccedbb 100644 --- a/src/test/java/emissary/server/mvc/internal/LookupActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/LookupActionTest.java @@ -2,10 +2,9 @@ import static org.junit.Assert.assertEquals; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.core.Response; import org.junit.Test; public class LookupActionTest extends EndpointTestBase { diff --git a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java index c01c5d18ad..24fb465af0 100644 --- a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java @@ -8,14 +8,13 @@ import java.io.IOException; import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/RegisterPlaceActionTest.java b/src/test/java/emissary/server/mvc/internal/RegisterPlaceActionTest.java index aafe432fd6..38844456d2 100644 --- a/src/test/java/emissary/server/mvc/internal/RegisterPlaceActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/RegisterPlaceActionTest.java @@ -4,9 +4,8 @@ import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; -import javax.ws.rs.core.Response; - import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.core.Response; import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.theories.DataPoints; diff --git a/src/test/java/emissary/server/mvc/internal/WorkBundleCompletedActionTest.java b/src/test/java/emissary/server/mvc/internal/WorkBundleCompletedActionTest.java index 2c3b4451aa..d237d6ac5a 100644 --- a/src/test/java/emissary/server/mvc/internal/WorkBundleCompletedActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/WorkBundleCompletedActionTest.java @@ -11,13 +11,12 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.pickup.WorkSpace; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeActionTest.java b/src/test/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeActionTest.java index 7dae2a93a7..e9f6f8456d 100644 --- a/src/test/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/WorkSpaceClientSpaceTakeActionTest.java @@ -2,7 +2,7 @@ import static emissary.server.mvc.internal.WorkSpaceClientSpaceTakeAction.CLIENT_NAME; import static emissary.server.mvc.internal.WorkSpaceClientSpaceTakeAction.SPACE_NAME; -import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.core.IsEqual.equalTo; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.doReturn; @@ -10,14 +10,13 @@ import java.util.Arrays; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MultivaluedHashMap; -import javax.ws.rs.core.Response; - import emissary.core.Namespace; import emissary.pickup.WorkBundle; import emissary.pickup.WorkSpace; import emissary.server.mvc.EndpointTestBase; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MultivaluedHashMap; +import jakarta.ws.rs.core.Response; import org.junit.After; import org.junit.Before; import org.junit.Test;