From 162d95e8f7527a53dd4a69fac1b4598534c934c3 Mon Sep 17 00:00:00 2001 From: flbruto Date: Sat, 6 Mar 2021 17:01:54 +0000 Subject: [PATCH 1/5] WIP: Java 11 upgrade --- pom.xml | 117 ++++++++++-------- .../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/RequestUtil.java | 3 +- .../server/mvc/adapters/WorkSpaceAdapter.java | 3 +- .../mvc/internal/DeregisterPlaceAction.java | 15 ++- .../mvc/internal/FailDirectoryAction.java | 15 ++- .../server/mvc/internal/HeartbeatAction.java | 15 ++- .../mvc/internal/RegisterPeerAction.java | 15 ++- .../mvc/internal/RollOutputsAction.java | 15 ++- .../internal/WorkBundleCompletedAction.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 +- .../internal/DeregisterPlaceActionTest.java | 7 +- .../mvc/internal/FailDirectoryActionTest.java | 7 +- .../mvc/internal/HeartbeatActionTest.java | 8 +- .../mvc/internal/RegisterPeerActionTest.java | 8 +- .../WorkBundleCompletedActionTest.java | 7 +- .../WorkSpaceClientSpaceTakeActionTest.java | 9 +- 50 files changed, 260 insertions(+), 301 deletions(-) diff --git a/pom.xml b/pom.xml index e546f4192f..da83191172 100644 --- a/pom.xml +++ b/pom.xml @@ -47,31 +47,33 @@ 2.3.3 1.3.2 + 3.0.0 1.58 2.0.2 - 2.34 - 9.4.42.v20210604 - 5.5.2 - 1.5.2 + 3.0.1 + 11.0.1 + 5.8.0-M1 + 1.8.0-M1 4.12 - 1.2.3 - 3.0.0-M3 - 1.10.19 + 1.3.0-alpha5 + 3.0.0-M5 + 3.8.0 2.0.8 1.7.13 - 1.7.30 + 2.0.0-alpha1 0.9.7 2.12.3 1.24 5.0.0 3.6.0 - 2.9.2 + 2.9.4 5.0.0 ${project.basedir}/contrib/formatter.xml + 11 true - 1.8 - 1.8 + 11 + 11 2.8.1 3.3.9 UTF-8 @@ -129,6 +131,11 @@ guava ${dep.guava.version} + + com.sun.activation + jakarta.activation + 2.0.0 + commons-cli commons-cli @@ -184,6 +191,11 @@ metrics-servlets ${dep.dropwizard.metrics.version} + + jakarta.servlet + jakarta.servlet-api + 5.0.0 + jakarta.xml.bind jakarta.xml.bind-api @@ -289,6 +301,11 @@ jetty-xml ${dep.jetty.version} + + org.glassfish.jaxb + jaxb-runtime + ${dep.jaxb.runtime.version} + org.glassfish.jersey.containers jersey-container-jetty-http @@ -313,12 +330,6 @@ org.glassfish.jersey.ext jersey-mvc ${dep.jersey.version} - - - javax.servlet - servlet-api - - org.glassfish.jersey.ext @@ -326,14 +337,9 @@ ${dep.jersey.version} - com.github.spullara.mustache.java compiler - - javax.servlet - servlet-api - @@ -430,15 +436,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 @@ -448,7 +448,7 @@ org.mockito - mockito-all + mockito-core ${dep.mockito-all.version} test @@ -521,6 +521,10 @@ io.dropwizard.metrics metrics-servlets + + jakarta.xml.bind + jakarta.xml.bind-api + net.spy spymemcached @@ -577,6 +581,10 @@ org.eclipse.jetty jetty-xml + + org.glassfish.jaxb + jaxb-runtime + org.glassfish.jersey.containers jersey-container-jetty-http @@ -651,17 +659,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 @@ -728,12 +742,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 @@ -746,7 +760,7 @@ [${maven.min-version},) - [1.8,) + [11,) @@ -757,7 +771,7 @@ org.apache.maven.plugins maven-resources-plugin - 3.1.0 + 3.2.0 ${*} @@ -770,7 +784,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.0 + 3.2.1 attach-sources @@ -794,7 +808,7 @@ org.apache.maven.plugins maven-site-plugin - 3.8.2 + 3.9.1 true false @@ -834,7 +848,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.1.1 + 3.2.0 true
Generated ${maven.build.timestamp}
@@ -853,7 +867,7 @@ org.apache.maven.plugins maven-release-plugin - 2.5.3 + 3.0.0-M1 true true @@ -865,17 +879,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 @@ -886,6 +900,7 @@ -Xlint:-path,unchecked + ${maven.compiler.release} @@ -899,12 +914,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} @@ -931,7 +946,7 @@ net.revelc.code impsort-maven-plugin - 1.3.2 + 1.4.1 java.,javax.,* true @@ -948,7 +963,7 @@ org.jacoco jacoco-maven-plugin - 0.8.4 + 0.8.6 default-prepare-agent @@ -992,7 +1007,7 @@ org.apache.maven.plugins maven-pmd-plugin - 3.12.0 + 3.13.0 false @@ -1012,7 +1027,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 false false @@ -1406,7 +1421,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. --> @@ -1625,7 +1640,7 @@ [9,) - 8 + 11 diff --git a/src/main/java/emissary/client/EmissaryClient.java b/src/main/java/emissary/client/EmissaryClient.java index a3ce6053c2..d85bc15f2b 100644 --- a/src/main/java/emissary/client/EmissaryClient.java +++ b/src/main/java/emissary/client/EmissaryClient.java @@ -5,11 +5,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 3f6c4c2d1a..6b15c80e73 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 8461b7d77a..45021a50d9 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/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 d1710bd81d..331d154a73 100755 --- a/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java +++ b/src/main/java/emissary/server/mvc/adapters/WorkSpaceAdapter.java @@ -5,8 +5,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; @@ -15,6 +13,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/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 8b41bc8534..71a53efa90 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 50222d1fd9..f1ecf69245 100644 --- a/src/main/java/emissary/server/mvc/internal/HeartbeatAction.java +++ b/src/main/java/emissary/server/mvc/internal/HeartbeatAction.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.NamespaceException; import emissary.directory.IDirectoryPlace; import emissary.place.IServiceProviderPlace; 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/RegisterPeerAction.java b/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java index 232ecd4fcf..2a781d1e17 100644 --- a/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java +++ b/src/main/java/emissary/server/mvc/internal/RegisterPeerAction.java @@ -6,14 +6,6 @@ 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.core.Namespace; import emissary.core.NamespaceException; import emissary.directory.DirectoryPlace; @@ -21,6 +13,13 @@ 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/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/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 25c6ce0f2e..c57105d647 100644 --- a/src/test/java/emissary/server/api/PeersIT.java +++ b/src/test/java/emissary/server/api/PeersIT.java @@ -9,8 +9,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; @@ -21,6 +19,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/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 0a5c53ac17..8f92556543 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 3a68ff69b1..8431fd636e 100644 --- a/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java @@ -7,16 +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.config.ConfigUtil; import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; 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.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java index 23d00b699e..31ee0e8997 100644 --- a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java @@ -10,15 +10,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.config.ConfigUtil; 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/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; From 358e1e49c95b356c2f0af632adc195a2980f3e56 Mon Sep 17 00:00:00 2001 From: flbruto Date: Thu, 15 Apr 2021 15:52:43 +0000 Subject: [PATCH 2/5] Updating dependencies and changes from #83 --- .github/workflows/maven.yml | 6 +- .gitignore | 3 + pom.xml | 149 ++++++++++++++++++------------------ 3 files changed, 82 insertions(+), 76 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 788a55fa6a..b84caa8e08 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Cache Maven Dependencies uses: actions/cache@v1 with: @@ -27,4 +27,4 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build with Maven - run: mvn -B package --file pom.xml + run: mvn -B package -Pcoverage,checkstyle,pmd,errorProne,dist --file pom.xml diff --git a/.gitignore b/.gitignore index a41a5b3bba..e5b90111a5 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,6 @@ nbactions*.xml .settings/ *.swp *.checkstyle + +# Formatter cache +.cache \ No newline at end of file diff --git a/pom.xml b/pom.xml index da83191172..80d3ff7eaf 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ 2.6 1.2 2.9.0 - 3.1.0 + 3.2.6 30.1.1-jre 2.0.0.0 4.5.13 @@ -51,14 +51,14 @@ 1.58 2.0.2 3.0.1 - 11.0.1 + 11.0.2 5.8.0-M1 1.8.0-M1 4.12 1.3.0-alpha5 3.0.0-M5 - 3.8.0 + 3.9.0 2.0.8 1.7.13 2.0.0-alpha1 @@ -72,8 +72,6 @@ ${project.basedir}/contrib/formatter.xml 11 true - 11 - 11 2.8.1 3.3.9 UTF-8 @@ -134,7 +132,7 @@ com.sun.activation jakarta.activation - 2.0.0 + 2.0.1 commons-cli @@ -206,6 +204,11 @@ javax.annotation-api ${dep.javax.annotation-api.version} + + joda-time + joda-time + 2.9.1 + junit junit @@ -923,7 +926,7 @@ ${maven.compiler.source} ${maven.compiler.source} - ${maven.compiler.target} + ${maven.compiler.release} ${eclipseFormatterStyle} LF true @@ -1016,7 +1019,7 @@ true 100 ${project.build.sourceEncoding} - ${maven.compiler.target} + ${maven.compiler.release} @@ -1417,14 +1420,6 @@ - errorProne @@ -1436,73 +1431,81 @@ org.apache.maven.plugins maven-compiler-plugin + 3.8.1 - javac-with-errorprone - - true + true - - -Xmaxwarns - 5000 - -XepDisableWarningsInGeneratedCode + -XDcompilePolicy=simple + -Xplugin:ErrorProne + -Xep:Var:OFF + -Xep:ConstantField:WARN + -Xep:RemoveUnusedImports:WARN + -Xep:WildcardImport:WARN + -Xep:ArrayToString:WARN + -Xep:ComparisonOutOfRange:WARN + -Xep:DeadException:WARN + -Xep:DefaultCharset:OFF + -Xep:DepAnn:WARN + -Xep:FormatString:WARN + -Xep:LongLiteralLowerCaseSuffix:WARN + -Xep:MethodCanBeStatic:WARN + -Xep:MixedArrayDimensions:WARN + -Xep:MultiVariableDeclaration:WARN + -Xep:MultipleTopLevelClasses:WARN + -Xep:NumericEquality:WARN + -Xep:PrivateConstructorForUtilityClass:WARN + -Xep:ThrowsUncheckedException:WARN + -Xep:TryFailThrowable:WARN + - -XepAllDisabledChecksAsWarnings + - -Xep:ArgumentParameterMismatch:OFF + - -Xep:ArgumentParameterSwap:OFF + - -Xep:Var:OFF + modifiable variables marked with @Var and + complains about the use of final everywhere else. + I'd be okay with adding the annotations, but + removing the finals is only safe if you can + guarantee you never use the compiler *without* + this add-on. --> + - -Xep:ConstantField:WARN - -Xep:RemoveUnusedImports:WARN - -Xep:WildcardImport:WARN + doesn't get counted as a warning. Change it to a + counted warning to make it easier to see how many + there are. --> + + + - -Xep:ArrayToString:WARN - -Xep:ComparisonOutOfRange:WARN - -Xep:DeadException:WARN - -Xep:DefaultCharset:OFF - -Xep:DepAnn:WARN - -Xep:FormatString:WARN - -Xep:LongLiteralLowerCaseSuffix:WARN - -Xep:MethodCanBeStatic:WARN - -Xep:MixedArrayDimensions:WARN - -Xep:MultiVariableDeclaration:WARN - -Xep:MultipleTopLevelClasses:WARN - -Xep:NumericEquality:WARN - -Xep:ParameterPackage:WARN - -Xep:PrivateConstructorForUtilityClass:WARN - -Xep:ThrowsUncheckedException:WARN - -Xep:TryFailThrowable:WARN + to warnings so that it doesn't stop the build + from continuing its analysis. --> + + + + + + com.google.errorprone + error_prone_core + 2.6.0 + + - - - - com.google.errorprone - error_prone_core - 2.3.1 - - - org.codehaus.plexus - plexus-compiler-javac-errorprone - 2.8.3 - - From 246f7ba5b743aaaeab06263cd1ba98faea5c4427 Mon Sep 17 00:00:00 2001 From: flbruto Date: Sun, 25 Jul 2021 01:21:22 +0000 Subject: [PATCH 3/5] Updating dependency versions and adding jakarta bind dependency --- pom.xml | 13 +++++++++---- .../java/emissary/client/response/AgentList.java | 6 +++--- .../client/response/AgentsResponseEntity.java | 8 ++++---- .../client/response/BaseResponseEntity.java | 10 +++++----- .../emissary/client/response/MapResponseEntity.java | 8 ++++---- .../java/emissary/client/response/PeerList.java | 6 +++--- .../client/response/PeersResponseEntity.java | 8 ++++---- .../java/emissary/client/response/PlaceList.java | 6 +++--- .../client/response/PlacesResponseEntity.java | 8 ++++---- .../java/emissary/test/core/ExtractionTest.java | 3 +-- .../java/emissary/util/magic/MagicNumberTest.java | 3 +-- 11 files changed, 41 insertions(+), 38 deletions(-) diff --git a/pom.xml b/pom.xml index 80d3ff7eaf..7aa724393d 100644 --- a/pom.xml +++ b/pom.xml @@ -44,14 +44,14 @@ 4.4.14 2.12.3 - 2.3.3 + 3.0.1 1.3.2 3.0.0 1.58 2.0.2 - 3.0.1 - 11.0.2 + 3.0.2 + 11.0.6 5.8.0-M1 1.8.0-M1 @@ -67,7 +67,7 @@ 1.24 5.0.0 3.6.0 - 2.9.4 + 2.9.2 5.0.0 ${project.basedir}/contrib/formatter.xml 11 @@ -199,6 +199,11 @@ jakarta.xml.bind-api ${dep.jakarta.xml.bind-api.version}
+ + javax.activation + activation + 1.1.1 + javax.annotation javax.annotation-api diff --git a/src/main/java/emissary/client/response/AgentList.java b/src/main/java/emissary/client/response/AgentList.java index de7f3ed0d6..ac3041f787 100644 --- a/src/main/java/emissary/client/response/AgentList.java +++ b/src/main/java/emissary/client/response/AgentList.java @@ -4,9 +4,9 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; @XmlAccessorType(XmlAccessType.NONE) public class AgentList { diff --git a/src/main/java/emissary/client/response/AgentsResponseEntity.java b/src/main/java/emissary/client/response/AgentsResponseEntity.java index 3af256c36c..1b6f77a089 100644 --- a/src/main/java/emissary/client/response/AgentsResponseEntity.java +++ b/src/main/java/emissary/client/response/AgentsResponseEntity.java @@ -6,10 +6,10 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "agents") @XmlAccessorType(XmlAccessType.NONE) diff --git a/src/main/java/emissary/client/response/BaseResponseEntity.java b/src/main/java/emissary/client/response/BaseResponseEntity.java index d8f1942139..8fa774d923 100644 --- a/src/main/java/emissary/client/response/BaseResponseEntity.java +++ b/src/main/java/emissary/client/response/BaseResponseEntity.java @@ -4,11 +4,11 @@ import java.util.HashSet; import java.util.Set; -import javax.xml.bind.annotation.XmlAccessOrder; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorOrder; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlAccessOrder; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorOrder; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; @XmlAccessorType(XmlAccessType.NONE) @XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL) diff --git a/src/main/java/emissary/client/response/MapResponseEntity.java b/src/main/java/emissary/client/response/MapResponseEntity.java index 0ce1e1b3ed..3c8f1d8d42 100644 --- a/src/main/java/emissary/client/response/MapResponseEntity.java +++ b/src/main/java/emissary/client/response/MapResponseEntity.java @@ -4,10 +4,10 @@ import java.util.Map; import java.util.TreeMap; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "mapResponseEntity") @XmlAccessorType(XmlAccessType.NONE) diff --git a/src/main/java/emissary/client/response/PeerList.java b/src/main/java/emissary/client/response/PeerList.java index fbe9f6ed14..aafe69c8ad 100644 --- a/src/main/java/emissary/client/response/PeerList.java +++ b/src/main/java/emissary/client/response/PeerList.java @@ -2,9 +2,9 @@ import java.util.Set; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; @XmlAccessorType(XmlAccessType.NONE) public class PeerList { diff --git a/src/main/java/emissary/client/response/PeersResponseEntity.java b/src/main/java/emissary/client/response/PeersResponseEntity.java index f6c18dc188..db8cace3c4 100644 --- a/src/main/java/emissary/client/response/PeersResponseEntity.java +++ b/src/main/java/emissary/client/response/PeersResponseEntity.java @@ -3,10 +3,10 @@ import java.util.HashSet; import java.util.Set; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "peers") @XmlAccessorType(XmlAccessType.NONE) diff --git a/src/main/java/emissary/client/response/PlaceList.java b/src/main/java/emissary/client/response/PlaceList.java index f04eadfcab..e307510cb2 100644 --- a/src/main/java/emissary/client/response/PlaceList.java +++ b/src/main/java/emissary/client/response/PlaceList.java @@ -4,9 +4,9 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; @XmlAccessorType(XmlAccessType.NONE) public class PlaceList { diff --git a/src/main/java/emissary/client/response/PlacesResponseEntity.java b/src/main/java/emissary/client/response/PlacesResponseEntity.java index 528fd3d74c..a924610561 100644 --- a/src/main/java/emissary/client/response/PlacesResponseEntity.java +++ b/src/main/java/emissary/client/response/PlacesResponseEntity.java @@ -3,10 +3,10 @@ import java.util.HashSet; import java.util.Set; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "peers") @XmlAccessorType(XmlAccessType.NONE) diff --git a/src/main/java/emissary/test/core/ExtractionTest.java b/src/main/java/emissary/test/core/ExtractionTest.java index 2e08c2eb27..b73bf07a08 100644 --- a/src/main/java/emissary/test/core/ExtractionTest.java +++ b/src/main/java/emissary/test/core/ExtractionTest.java @@ -12,8 +12,6 @@ import java.util.Collections; import java.util.List; -import javax.xml.bind.DatatypeConverter; - import emissary.core.DataObjectFactory; import emissary.core.Family; import emissary.core.IBaseDataObject; @@ -21,6 +19,7 @@ import emissary.place.IServiceProviderPlace; import emissary.util.io.ResourceReader; import emissary.util.xml.JDOMUtil; +import jakarta.xml.bind.DatatypeConverter; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.jdom2.Attribute; diff --git a/src/test/java/emissary/util/magic/MagicNumberTest.java b/src/test/java/emissary/util/magic/MagicNumberTest.java index dde318e583..015ddceec1 100644 --- a/src/test/java/emissary/util/magic/MagicNumberTest.java +++ b/src/test/java/emissary/util/magic/MagicNumberTest.java @@ -3,9 +3,8 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import javax.xml.bind.DatatypeConverter; - import emissary.test.core.UnitTest; +import jakarta.xml.bind.DatatypeConverter; import org.junit.Test; public class MagicNumberTest extends UnitTest { From 46d0ef8f843b15745c3020905cdbff68afb239ba Mon Sep 17 00:00:00 2001 From: flbruto Date: Sun, 25 Jul 2021 01:37:43 +0000 Subject: [PATCH 4/5] Fixing test imports --- .../java/emissary/server/mvc/internal/HeartbeatActionTest.java | 1 + .../emissary/server/mvc/internal/RegisterPeerActionTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java b/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java index 8431fd636e..7a52d9a62c 100644 --- a/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/HeartbeatActionTest.java @@ -7,6 +7,7 @@ import java.util.Arrays; +import emissary.config.ConfigUtil; import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; diff --git a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java index 31ee0e8997..a84699cd10 100644 --- a/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java +++ b/src/test/java/emissary/server/mvc/internal/RegisterPeerActionTest.java @@ -10,6 +10,7 @@ import java.io.IOException; import java.util.Arrays; +import emissary.config.ConfigUtil; import emissary.core.Namespace; import emissary.directory.DirectoryPlace; import emissary.directory.EmissaryNode; From ff12bae3b04f6faee310f9b0674978034ef8be6b Mon Sep 17 00:00:00 2001 From: flbruto Date: Sun, 25 Jul 2021 19:03:42 +0000 Subject: [PATCH 5/5] Version updates and reverted surfire/failsafe version back to 3.0.0-M3 to address failed IT tests --- pom.xml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 7aa724393d..7e9cabb799 100644 --- a/pom.xml +++ b/pom.xml @@ -33,21 +33,21 @@ 4.4 1.3 1.4 - 2.8.0 + 2.11.0 2.6 1.2 - 2.9.0 + 2.10.0 3.2.6 30.1.1-jre 2.0.0.0 4.5.13 4.4.14 - 2.12.3 + 2.12.4 3.0.1 1.3.2 - 3.0.0 + 3.0.1 1.58 2.0.2 3.0.2 @@ -55,20 +55,20 @@ 5.8.0-M1 1.8.0-M1 - 4.12 + 4.13.2 1.3.0-alpha5 - 3.0.0-M5 - 3.9.0 + 3.0.0-M3 + 3.11.2 2.0.8 1.7.13 - 2.0.0-alpha1 - 0.9.7 + 2.0.0-alpha2 + 0.9.10 2.12.3 - 1.24 - 5.0.0 + 1.27 + 5.0.2 3.6.0 2.9.2 - 5.0.0 + 5.0.1 ${project.basedir}/contrib/formatter.xml 11 true @@ -189,6 +189,11 @@ metrics-servlets ${dep.dropwizard.metrics.version} + + jakarta.annotation + jakarta.annotation-api + 2.0.0 + jakarta.servlet jakarta.servlet-api @@ -212,7 +217,7 @@ joda-time joda-time - 2.9.1 + 2.10.10 junit @@ -841,7 +846,7 @@ com.puppycrawl.tools checkstyle - 8.42 + 8.44