From 2a8805d6c165ed29caf5a4942d122be61e612f8b Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Fri, 26 Jun 2026 21:35:30 +0200 Subject: [PATCH 1/6] starting to update Jersey --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 190cc0f09c..7f26fdb313 100644 --- a/pom.xml +++ b/pom.xml @@ -224,7 +224,11 @@ 3.0.0 9.4.29.v20200521 1.7.24 - 2.33 + + 2.48 2.2.5 From 4cc5b7a86e335e87990256082b366502048c663d Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Sat, 27 Jun 2026 20:45:15 +0200 Subject: [PATCH 3/6] starting to split Jersey between core and client --- client-java/pom.xml | 41 +++++++++++++++++++++++++++++++++++++++++ core-parent/pom.xml | 20 ++++++++++++++++++++ pom.xml | 37 ------------------------------------- 3 files changed, 61 insertions(+), 37 deletions(-) diff --git a/client-java/pom.xml b/client-java/pom.xml index a80b4d7959..f12b8fdec8 100644 --- a/client-java/pom.xml +++ b/client-java/pom.xml @@ -36,6 +36,12 @@ + + 2.48 2.5.4 @@ -60,6 +66,41 @@ javax.servlet-api 3.1.0 + + + + + org.glassfish.jersey.core + jersey-client + ${jersey.version} + + + org.glassfish.jersey.core + jersey-server + ${jersey.version} + + + org.glassfish.jersey.containers + jersey-container-servlet-core + ${jersey.version} + + + org.glassfish.jersey.containers + jersey-container-jetty-http + ${jersey.version} + + + org.eclipse.jetty + * + + + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey.version} + + diff --git a/core-parent/pom.xml b/core-parent/pom.xml index 317eb240bb..0238e69f7d 100644 --- a/core-parent/pom.xml +++ b/core-parent/pom.xml @@ -14,6 +14,7 @@ ${project.groupId}:${project.artifactId} + 2.48 1.0.64 @@ -24,6 +25,25 @@ + + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey.version} + + + org.glassfish.jersey.core + jersey-client + ${jersey.version} + + + org.glassfish.jersey.inject + jersey-hk2 + ${jersey.version} + + + com.google.inject diff --git a/pom.xml b/pom.xml index 157f9fa206..0c9894a2b6 100644 --- a/pom.xml +++ b/pom.xml @@ -224,11 +224,6 @@ 3.0.0 9.4.29.v20200521 1.7.24 - - 2.48 2.2.5 - - org.glassfish.jersey.core - jersey-client - ${jersey.version} - - - org.glassfish.jersey.core - jersey-server - ${jersey.version} - - - org.glassfish.jersey.containers - jersey-container-servlet-core - ${jersey.version} - - - org.glassfish.jersey.containers - jersey-container-jetty-http - ${jersey.version} - - - org.eclipse.jetty - * - - - - - org.glassfish.jersey.inject - jersey-hk2 - ${jersey.version} - From 61a22bfdb02da61eb69cc9a4554822aec5a22c1b Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Sat, 27 Jun 2026 21:52:15 +0200 Subject: [PATCH 4/6] started move from javax to jakarta --- core-parent/pom.xml | 16 ++++++++- core-tests/integration-tests/core-it/pom.xml | 11 +++--- .../rest/aiclassification/ExtraTools.kt | 2 +- .../spring-rest-openapi-v2-tests/pom.xml | 2 +- core/pom.xml | 36 ++++++++++++------- .../metrics/DistanceMetricErrorText.kt | 2 +- .../output/naming/rest/RestNamingUtils.kt | 2 +- .../output/service/HttpWsTestCaseWriter.kt | 2 +- .../core/problem/api/service/ApiWsFitness.kt | 2 +- .../HarvestActualHttpWsResponseHandler.kt | 15 ++++---- .../core/problem/graphql/GraphQLUtils.kt | 2 +- .../problem/graphql/IntrospectiveQuery.kt | 6 ++-- .../problem/graphql/service/GraphQLFitness.kt | 9 +++-- .../core/problem/httpws/HttpWsCallResult.kt | 2 +- .../core/problem/httpws/auth/AuthUtils.kt | 12 +++---- .../problem/httpws/service/HttpWsFitness.kt | 6 ++-- .../core/problem/rest/RestResponseFeeder.kt | 2 +- .../core/problem/rest/data/RestCallResult.kt | 2 +- .../problem/rest/link/RestLinkValueUpdater.kt | 2 +- .../core/problem/rest/schema/OpenApiAccess.kt | 3 +- .../rest/service/RestIndividualBuilder.kt | 2 -- .../service/fitness/AbstractRestFitness.kt | 10 +++--- .../service/fitness/BlackBoxRestFitness.kt | 4 +-- .../service/fitness/ResourceRestFitness.kt | 2 +- .../core/remote/HttpClientFactory.kt | 13 ++++--- .../org/evomaster/core/remote/TcpUtils.kt | 2 +- .../service/RemoteControllerImplementation.kt | 16 ++++----- .../core/output/PythonTestCaseWriterTest.kt | 2 +- .../core/output/TestCaseWriterTest.kt | 2 +- .../naming/RestActionNamingStrategyTest.kt | 2 +- .../output/naming/RestActionTestCaseUtils.kt | 2 +- .../core/problem/rest/RestCallResultTest.kt | 2 +- .../problem/rest/RestResponseFeederTest.kt | 2 +- .../problem/rest/RestSchemaOraclesTest.kt | 2 +- .../rest/oracle/HttpSemanticsOracleTest.kt | 4 +-- 35 files changed, 111 insertions(+), 92 deletions(-) diff --git a/core-parent/pom.xml b/core-parent/pom.xml index 0238e69f7d..8d93997169 100644 --- a/core-parent/pom.xml +++ b/core-parent/pom.xml @@ -14,7 +14,9 @@ ${project.groupId}:${project.artifactId} - 2.48 + + 4.0.2 1.0.64 @@ -42,6 +44,18 @@ jersey-hk2 ${jersey.version} + + org.glassfish.jersey.connectors + jersey-apache5-connector + ${jersey.version} + + + org.apache.httpcomponents.client5 + httpclient5 + 5.6.1 + + + diff --git a/core-tests/integration-tests/core-it/pom.xml b/core-tests/integration-tests/core-it/pom.xml index f55dd6a5ef..40028865c4 100644 --- a/core-tests/integration-tests/core-it/pom.xml +++ b/core-tests/integration-tests/core-it/pom.xml @@ -17,6 +17,12 @@ + + + org.evomaster + evomaster-core + + + + javax.annotation + javax.annotation-api + 1.2 + + + javax.inject + javax.inject + 1 + + + org.evomaster evomaster-test-utils-java @@ -49,19 +63,6 @@ - - org.glassfish.jersey.connectors - jersey-apache-connector - ${jersey.version} - - - org.apache.httpcomponents - httpclient - - - - - com.h2database h2 @@ -138,6 +139,14 @@ logback-classic + + org.glassfish.jersey.connectors + jersey-apache5-connector + + + org.apache.httpcomponents.client5 + httpclient5 + org.glassfish.jersey.media jersey-media-json-jackson @@ -152,6 +161,7 @@ + io.swagger swagger-parser diff --git a/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt b/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt index b7f52b7966..abe239ffd0 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt @@ -1,7 +1,7 @@ package org.evomaster.core.output.clustering.metrics import org.evomaster.core.problem.httpws.HttpWsCallResult -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType /** diff --git a/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt b/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt index 05555d845b..179db6311f 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt @@ -7,7 +7,7 @@ import org.evomaster.core.problem.rest.data.HttpVerb import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult import org.evomaster.core.search.action.EvaluatedAction -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType object RestNamingUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt b/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt index 44e268d9b4..482d09dbf0 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt @@ -34,7 +34,7 @@ import org.evomaster.core.search.gene.utils.GeneUtils import org.evomaster.core.search.gene.wrapper.ChoiceGene import org.slf4j.LoggerFactory import java.nio.file.Path -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType import kotlin.collections.filter diff --git a/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt index 3419e52d80..ea95cbb7fe 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory import java.nio.file.Files import java.nio.file.Paths import java.nio.file.StandardOpenOption -import javax.ws.rs.core.Response +import jakarta.ws.rs.core.Response /** * abstract class for handling fitness of API based SUT, such as REST, GraphQL, RPC diff --git a/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt b/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt index f79070aa3c..fa9b05b3a4 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt @@ -15,7 +15,6 @@ import org.evomaster.core.problem.externalservice.httpws.HttpExternalServiceRequ import org.evomaster.core.problem.externalservice.httpws.HttpExternalServiceRequest.Companion.getTextualURLFromRequestDescription import org.evomaster.core.problem.externalservice.httpws.param.HttpWsResponseParam import org.evomaster.core.problem.externalservice.param.ResponseParam -import org.evomaster.core.problem.util.ParamUtil import org.evomaster.core.problem.util.ParserDtoUtil import org.evomaster.core.problem.util.ParserDtoUtil.getJsonNodeFromText import org.evomaster.core.problem.util.ParserDtoUtil.parseJsonNodeAsGene @@ -40,13 +39,13 @@ import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import javax.annotation.PostConstruct import javax.annotation.PreDestroy -import javax.ws.rs.ProcessingException -import javax.ws.rs.client.Client -import javax.ws.rs.client.ClientBuilder -import javax.ws.rs.client.Entity -import javax.ws.rs.client.Invocation -import javax.ws.rs.core.MediaType -import javax.ws.rs.core.Response +import jakarta.ws.rs.ProcessingException +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.ClientBuilder +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.client.Invocation +import jakarta.ws.rs.core.MediaType +import jakarta.ws.rs.core.Response import kotlin.math.max import kotlin.math.min diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt index f0d53e1a40..d94e6fe54d 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt @@ -17,7 +17,7 @@ import org.evomaster.core.search.gene.string.StringGene import org.evomaster.core.search.gene.utils.GeneUtils import org.slf4j.LoggerFactory import java.util.* -import javax.ws.rs.client.Entity +import jakarta.ws.rs.client.Entity object GraphQLUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt index 23445621bf..d1a399f972 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt @@ -9,9 +9,9 @@ import org.evomaster.core.remote.HttpClientFactory import org.evomaster.core.remote.SutProblemException import org.evomaster.core.utils.TimeUtils import org.slf4j.LoggerFactory -import javax.ws.rs.client.Client -import javax.ws.rs.client.Entity -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.core.MediaType class IntrospectiveQuery { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt index e1d1876ed2..df12b745c3 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt @@ -18,11 +18,10 @@ import org.evomaster.core.search.gene.utils.GeneUtils import org.evomaster.core.taint.TaintAnalysis import org.slf4j.Logger import org.slf4j.LoggerFactory -import javax.ws.rs.ProcessingException -import javax.ws.rs.client.ClientBuilder -import javax.ws.rs.client.Entity -import javax.ws.rs.client.Invocation -import javax.ws.rs.core.NewCookie +import jakarta.ws.rs.ProcessingException +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.client.Invocation +import jakarta.ws.rs.core.NewCookie open class GraphQLFitness : HttpWsFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt index aa4ba5846d..b0e5b53715 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt @@ -5,7 +5,7 @@ import com.google.gson.Gson import com.google.gson.JsonSyntaxException import org.evomaster.core.problem.enterprise.EnterpriseActionResult import org.evomaster.core.problem.rest.data.HttpVerb -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType abstract class HttpWsCallResult : EnterpriseActionResult { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt index e4db52fb83..ba1b5d8d90 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt @@ -13,12 +13,12 @@ import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.search.Individual import org.slf4j.Logger import org.slf4j.LoggerFactory -import javax.ws.rs.client.Client -import javax.ws.rs.client.Entity -import javax.ws.rs.client.Invocation -import javax.ws.rs.core.MediaType -import javax.ws.rs.core.NewCookie -import javax.ws.rs.core.Response +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.client.Invocation +import jakarta.ws.rs.core.MediaType +import jakarta.ws.rs.core.NewCookie +import jakarta.ws.rs.core.Response object AuthUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt index 9684d74a4c..ce52ae41b6 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt @@ -20,9 +20,9 @@ import org.slf4j.LoggerFactory import java.net.MalformedURLException import java.net.URL import javax.annotation.PostConstruct -import javax.ws.rs.client.Client -import javax.ws.rs.client.Invocation -import javax.ws.rs.core.NewCookie +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.Invocation +import jakarta.ws.rs.core.NewCookie abstract class HttpWsFitness: ApiWsFitness() where T : Individual { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt index 8e267826de..d388f1bd37 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt @@ -10,7 +10,7 @@ import org.evomaster.core.problem.rest.data.HttpVerb import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult import org.evomaster.core.search.service.DataPool -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType object RestResponseFeeder { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt index 2367781ee5..499e0d1f39 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt @@ -7,7 +7,7 @@ import org.evomaster.core.problem.httpws.HttpWsCallResult import org.evomaster.core.problem.rest.IdHeuristics import org.evomaster.core.problem.rest.IdLocationValue import org.evomaster.core.search.action.Action -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType class RestCallResult : HttpWsCallResult { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt index 8c354f07c6..8e898db58b 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt @@ -3,7 +3,7 @@ package org.evomaster.core.problem.rest.link import com.fasterxml.jackson.databind.ObjectMapper import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType object RestLinkValueUpdater { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt index 5432418a83..c151cbdff1 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt @@ -18,8 +18,7 @@ import java.net.URI import java.net.URL import java.nio.file.Files import java.nio.file.Paths -import javax.ws.rs.client.ClientBuilder -import javax.ws.rs.core.Response +import jakarta.ws.rs.core.Response /** * Created by arcuri82 on 22-Jan-20. diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt index 4a094dc2dd..a804088253 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt @@ -11,10 +11,8 @@ import org.evomaster.core.problem.rest.data.RestIndividual import org.evomaster.core.problem.rest.data.RestPath import org.evomaster.core.problem.rest.service.sampler.AbstractRestSampler import org.evomaster.core.search.EvaluatedIndividual -import org.evomaster.core.search.action.EnvironmentAction import org.evomaster.core.search.service.Randomness import org.evomaster.core.sql.SqlAction -import javax.ws.rs.POST /** diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt index f3ae8c6ad6..67bfe89775 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt @@ -70,11 +70,11 @@ import java.net.URLEncoder import java.nio.charset.StandardCharsets import javax.annotation.PostConstruct import javax.inject.Inject -import javax.ws.rs.ProcessingException -import javax.ws.rs.client.Entity -import javax.ws.rs.client.Invocation -import javax.ws.rs.core.MediaType -import javax.ws.rs.core.NewCookie +import jakarta.ws.rs.ProcessingException +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.client.Invocation +import jakarta.ws.rs.core.MediaType +import jakarta.ws.rs.core.NewCookie abstract class AbstractRestFitness : HttpWsFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt index bc93bafb9a..cc3a524990 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt @@ -14,12 +14,10 @@ import org.evomaster.core.problem.rest.service.CallGraphService import org.evomaster.core.search.action.ActionResult import org.evomaster.core.search.EvaluatedIndividual import org.evomaster.core.search.FitnessValue -import org.evomaster.core.search.StructuralElement import org.evomaster.core.utils.CollectionUtils import org.slf4j.Logger import org.slf4j.LoggerFactory -import javax.inject.Inject -import javax.ws.rs.core.NewCookie +import jakarta.ws.rs.core.NewCookie class BlackBoxRestFitness : RestFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt index d8e6abec88..e4a3e244c7 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt @@ -23,7 +23,7 @@ import org.evomaster.core.search.FitnessValue import org.evomaster.core.search.Individual import org.slf4j.Logger import org.slf4j.LoggerFactory -import javax.ws.rs.core.NewCookie +import jakarta.ws.rs.core.NewCookie /** * take care of calculating/collecting fitness of [RestIndividual] diff --git a/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt b/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt index 550e996e6d..8dbafaa3fc 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt @@ -1,16 +1,15 @@ package org.evomaster.core.remote import org.evomaster.core.Lazy -import org.glassfish.jersey.apache.connector.ApacheClientProperties -import org.glassfish.jersey.apache.connector.ApacheConnectorProvider +import org.glassfish.jersey.apache5.connector.Apache5ClientProperties +import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider import org.glassfish.jersey.client.ClientConfig import org.glassfish.jersey.client.ClientProperties -import org.glassfish.jersey.client.HttpUrlConnectorProvider import java.security.SecureRandom import java.security.cert.X509Certificate import javax.net.ssl.* -import javax.ws.rs.client.Client -import javax.ws.rs.client.ClientBuilder +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.ClientBuilder object HttpClientFactory { @@ -58,9 +57,9 @@ object HttpClientFactory { must use this connector, because default of Jersey has problems, eg, it does not handle PATCH properly and body payloads in GET/DELETE */ - .connectorProvider(ApacheConnectorProvider()) + .connectorProvider(Apache5ConnectorProvider()) .register(org.glassfish.jersey.jackson.JacksonFeature::class.java) - .property(ApacheClientProperties.DISABLE_COOKIES, true) + .property(Apache5ClientProperties.DISABLE_COOKIES, true) val client = ClientBuilder.newBuilder() .withConfig(config) diff --git a/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt b/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt index 0ed44812b7..20590cc877 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt @@ -6,7 +6,7 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import java.io.IOException import java.net.* -import javax.ws.rs.ProcessingException +import jakarta.ws.rs.ProcessingException object TcpUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt b/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt index 99555c765f..b500904041 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt @@ -20,14 +20,14 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import javax.annotation.PostConstruct import javax.annotation.PreDestroy -import javax.ws.rs.ProcessingException -import javax.ws.rs.client.Client -import javax.ws.rs.client.ClientBuilder -import javax.ws.rs.client.Entity -import javax.ws.rs.client.WebTarget -import javax.ws.rs.core.GenericType -import javax.ws.rs.core.MediaType -import javax.ws.rs.core.Response +import jakarta.ws.rs.ProcessingException +import jakarta.ws.rs.client.Client +import jakarta.ws.rs.client.ClientBuilder +import jakarta.ws.rs.client.Entity +import jakarta.ws.rs.client.WebTarget +import jakarta.ws.rs.core.GenericType +import jakarta.ws.rs.core.MediaType +import jakarta.ws.rs.core.Response /** * We split it from its interface, to be able to stub it away in the integration tests diff --git a/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt b/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt index 8ac07a22bb..7d762206b0 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt @@ -12,7 +12,7 @@ import org.evomaster.core.search.EvaluatedIndividual import org.evomaster.core.search.FitnessValue import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType class PythonTestCaseWriterTest : WriterTestBase(){ diff --git a/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt b/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt index db0750a2ed..418e06c83a 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt @@ -34,7 +34,7 @@ import org.evomaster.core.search.gene.wrapper.OptionalGene import org.evomaster.core.sql.schema.TableId import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType class TestCaseWriterTest : WriterTestBase(){ diff --git a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt index 30aed35981..4fb6db241f 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt @@ -19,7 +19,7 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import java.util.* import java.util.Collections.singletonList -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType open class RestActionNamingStrategyTest { diff --git a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt index 744721a635..de2715ed80 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt @@ -38,7 +38,7 @@ import org.evomaster.core.sql.SqlAction import org.evomaster.core.sql.SqlActionResult import java.util.* import java.util.Collections.singletonList -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType object RestActionTestCaseUtils { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt index f017f027a8..3010656fb0 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import java.util.stream.Stream -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType internal class RestCallResultTest { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt index db19aa2e1d..aa91e670b3 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt @@ -13,7 +13,7 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType class RestResponseFeederTest{ diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt index 5ae20347f4..e9c944c250 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt @@ -8,7 +8,7 @@ import org.evomaster.core.problem.rest.schema.RestSchema import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import javax.ws.rs.core.MediaType +import jakarta.ws.rs.core.MediaType class RestSchemaOraclesTest{ diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt index 4f7fa87a73..82e23205ca 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt @@ -416,12 +416,12 @@ class HttpSemanticsOracleTest { val putResult = RestCallResult(put.getLocalId()).apply { setStatusCode(putResponseStatus) setBody("{}") - setBodyType(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) + setBodyType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) } val getResult = RestCallResult(get.getLocalId()).apply { setStatusCode(getResponseStatus) setBody(getResponseBody) - setBodyType(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) + setBodyType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) } return HttpSemanticsOracle.hasMismatchedPutResponse( From 4f90e9115352a42bbef6b00dbd94b12b7df5d843 Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Sun, 28 Jun 2026 22:02:50 +0200 Subject: [PATCH 5/6] Revert "started move from javax to jakarta" This reverts commit 61a22bfdb02da61eb69cc9a4554822aec5a22c1b. --- core-parent/pom.xml | 16 +-------- core-tests/integration-tests/core-it/pom.xml | 11 +++--- .../rest/aiclassification/ExtraTools.kt | 2 +- .../spring-rest-openapi-v2-tests/pom.xml | 2 +- core/pom.xml | 36 +++++++------------ .../metrics/DistanceMetricErrorText.kt | 2 +- .../output/naming/rest/RestNamingUtils.kt | 2 +- .../output/service/HttpWsTestCaseWriter.kt | 2 +- .../core/problem/api/service/ApiWsFitness.kt | 2 +- .../HarvestActualHttpWsResponseHandler.kt | 15 ++++---- .../core/problem/graphql/GraphQLUtils.kt | 2 +- .../problem/graphql/IntrospectiveQuery.kt | 6 ++-- .../problem/graphql/service/GraphQLFitness.kt | 9 ++--- .../core/problem/httpws/HttpWsCallResult.kt | 2 +- .../core/problem/httpws/auth/AuthUtils.kt | 12 +++---- .../problem/httpws/service/HttpWsFitness.kt | 6 ++-- .../core/problem/rest/RestResponseFeeder.kt | 2 +- .../core/problem/rest/data/RestCallResult.kt | 2 +- .../problem/rest/link/RestLinkValueUpdater.kt | 2 +- .../core/problem/rest/schema/OpenApiAccess.kt | 3 +- .../rest/service/RestIndividualBuilder.kt | 2 ++ .../service/fitness/AbstractRestFitness.kt | 10 +++--- .../service/fitness/BlackBoxRestFitness.kt | 4 ++- .../service/fitness/ResourceRestFitness.kt | 2 +- .../core/remote/HttpClientFactory.kt | 13 +++---- .../org/evomaster/core/remote/TcpUtils.kt | 2 +- .../service/RemoteControllerImplementation.kt | 16 ++++----- .../core/output/PythonTestCaseWriterTest.kt | 2 +- .../core/output/TestCaseWriterTest.kt | 2 +- .../naming/RestActionNamingStrategyTest.kt | 2 +- .../output/naming/RestActionTestCaseUtils.kt | 2 +- .../core/problem/rest/RestCallResultTest.kt | 2 +- .../problem/rest/RestResponseFeederTest.kt | 2 +- .../problem/rest/RestSchemaOraclesTest.kt | 2 +- .../rest/oracle/HttpSemanticsOracleTest.kt | 4 +-- 35 files changed, 92 insertions(+), 111 deletions(-) diff --git a/core-parent/pom.xml b/core-parent/pom.xml index 8d93997169..0238e69f7d 100644 --- a/core-parent/pom.xml +++ b/core-parent/pom.xml @@ -14,9 +14,7 @@ ${project.groupId}:${project.artifactId} - - 4.0.2 + 2.48 1.0.64 @@ -44,18 +42,6 @@ jersey-hk2 ${jersey.version} - - org.glassfish.jersey.connectors - jersey-apache5-connector - ${jersey.version} - - - org.apache.httpcomponents.client5 - httpclient5 - 5.6.1 - - - diff --git a/core-tests/integration-tests/core-it/pom.xml b/core-tests/integration-tests/core-it/pom.xml index 40028865c4..f55dd6a5ef 100644 --- a/core-tests/integration-tests/core-it/pom.xml +++ b/core-tests/integration-tests/core-it/pom.xml @@ -17,12 +17,6 @@ - - - org.evomaster - evomaster-core - - - - javax.annotation - javax.annotation-api - 1.2 - - - javax.inject - javax.inject - 1 - - - org.evomaster evomaster-test-utils-java @@ -63,6 +49,19 @@ + + org.glassfish.jersey.connectors + jersey-apache-connector + ${jersey.version} + + + org.apache.httpcomponents + httpclient + + + + + com.h2database h2 @@ -139,14 +138,6 @@ logback-classic - - org.glassfish.jersey.connectors - jersey-apache5-connector - - - org.apache.httpcomponents.client5 - httpclient5 - org.glassfish.jersey.media jersey-media-json-jackson @@ -161,7 +152,6 @@ - io.swagger swagger-parser diff --git a/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt b/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt index abe239ffd0..b7f52b7966 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/clustering/metrics/DistanceMetricErrorText.kt @@ -1,7 +1,7 @@ package org.evomaster.core.output.clustering.metrics import org.evomaster.core.problem.httpws.HttpWsCallResult -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType /** diff --git a/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt b/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt index 179db6311f..05555d845b 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/naming/rest/RestNamingUtils.kt @@ -7,7 +7,7 @@ import org.evomaster.core.problem.rest.data.HttpVerb import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult import org.evomaster.core.search.action.EvaluatedAction -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType object RestNamingUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt b/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt index 482d09dbf0..44e268d9b4 100644 --- a/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt +++ b/core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt @@ -34,7 +34,7 @@ import org.evomaster.core.search.gene.utils.GeneUtils import org.evomaster.core.search.gene.wrapper.ChoiceGene import org.slf4j.LoggerFactory import java.nio.file.Path -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType import kotlin.collections.filter diff --git a/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt index ea95cbb7fe..3419e52d80 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsFitness.kt @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory import java.nio.file.Files import java.nio.file.Paths import java.nio.file.StandardOpenOption -import jakarta.ws.rs.core.Response +import javax.ws.rs.core.Response /** * abstract class for handling fitness of API based SUT, such as REST, GraphQL, RPC diff --git a/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt b/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt index fa9b05b3a4..f79070aa3c 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/externalservice/httpws/service/HarvestActualHttpWsResponseHandler.kt @@ -15,6 +15,7 @@ import org.evomaster.core.problem.externalservice.httpws.HttpExternalServiceRequ import org.evomaster.core.problem.externalservice.httpws.HttpExternalServiceRequest.Companion.getTextualURLFromRequestDescription import org.evomaster.core.problem.externalservice.httpws.param.HttpWsResponseParam import org.evomaster.core.problem.externalservice.param.ResponseParam +import org.evomaster.core.problem.util.ParamUtil import org.evomaster.core.problem.util.ParserDtoUtil import org.evomaster.core.problem.util.ParserDtoUtil.getJsonNodeFromText import org.evomaster.core.problem.util.ParserDtoUtil.parseJsonNodeAsGene @@ -39,13 +40,13 @@ import java.util.concurrent.ExecutorService import java.util.concurrent.Executors import javax.annotation.PostConstruct import javax.annotation.PreDestroy -import jakarta.ws.rs.ProcessingException -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.ClientBuilder -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.client.Invocation -import jakarta.ws.rs.core.MediaType -import jakarta.ws.rs.core.Response +import javax.ws.rs.ProcessingException +import javax.ws.rs.client.Client +import javax.ws.rs.client.ClientBuilder +import javax.ws.rs.client.Entity +import javax.ws.rs.client.Invocation +import javax.ws.rs.core.MediaType +import javax.ws.rs.core.Response import kotlin.math.max import kotlin.math.min diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt index d94e6fe54d..f0d53e1a40 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/GraphQLUtils.kt @@ -17,7 +17,7 @@ import org.evomaster.core.search.gene.string.StringGene import org.evomaster.core.search.gene.utils.GeneUtils import org.slf4j.LoggerFactory import java.util.* -import jakarta.ws.rs.client.Entity +import javax.ws.rs.client.Entity object GraphQLUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt index d1a399f972..23445621bf 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/IntrospectiveQuery.kt @@ -9,9 +9,9 @@ import org.evomaster.core.remote.HttpClientFactory import org.evomaster.core.remote.SutProblemException import org.evomaster.core.utils.TimeUtils import org.slf4j.LoggerFactory -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.client.Client +import javax.ws.rs.client.Entity +import javax.ws.rs.core.MediaType class IntrospectiveQuery { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt index df12b745c3..e1d1876ed2 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/graphql/service/GraphQLFitness.kt @@ -18,10 +18,11 @@ import org.evomaster.core.search.gene.utils.GeneUtils import org.evomaster.core.taint.TaintAnalysis import org.slf4j.Logger import org.slf4j.LoggerFactory -import jakarta.ws.rs.ProcessingException -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.client.Invocation -import jakarta.ws.rs.core.NewCookie +import javax.ws.rs.ProcessingException +import javax.ws.rs.client.ClientBuilder +import javax.ws.rs.client.Entity +import javax.ws.rs.client.Invocation +import javax.ws.rs.core.NewCookie open class GraphQLFitness : HttpWsFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt index b0e5b53715..aa4ba5846d 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/HttpWsCallResult.kt @@ -5,7 +5,7 @@ import com.google.gson.Gson import com.google.gson.JsonSyntaxException import org.evomaster.core.problem.enterprise.EnterpriseActionResult import org.evomaster.core.problem.rest.data.HttpVerb -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType abstract class HttpWsCallResult : EnterpriseActionResult { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt index ba1b5d8d90..e4db52fb83 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/auth/AuthUtils.kt @@ -13,12 +13,12 @@ import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.search.Individual import org.slf4j.Logger import org.slf4j.LoggerFactory -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.client.Invocation -import jakarta.ws.rs.core.MediaType -import jakarta.ws.rs.core.NewCookie -import jakarta.ws.rs.core.Response +import javax.ws.rs.client.Client +import javax.ws.rs.client.Entity +import javax.ws.rs.client.Invocation +import javax.ws.rs.core.MediaType +import javax.ws.rs.core.NewCookie +import javax.ws.rs.core.Response object AuthUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt index ce52ae41b6..9684d74a4c 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/httpws/service/HttpWsFitness.kt @@ -20,9 +20,9 @@ import org.slf4j.LoggerFactory import java.net.MalformedURLException import java.net.URL import javax.annotation.PostConstruct -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.Invocation -import jakarta.ws.rs.core.NewCookie +import javax.ws.rs.client.Client +import javax.ws.rs.client.Invocation +import javax.ws.rs.core.NewCookie abstract class HttpWsFitness: ApiWsFitness() where T : Individual { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt index d388f1bd37..8e267826de 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/RestResponseFeeder.kt @@ -10,7 +10,7 @@ import org.evomaster.core.problem.rest.data.HttpVerb import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult import org.evomaster.core.search.service.DataPool -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType object RestResponseFeeder { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt index 499e0d1f39..2367781ee5 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/data/RestCallResult.kt @@ -7,7 +7,7 @@ import org.evomaster.core.problem.httpws.HttpWsCallResult import org.evomaster.core.problem.rest.IdHeuristics import org.evomaster.core.problem.rest.IdLocationValue import org.evomaster.core.search.action.Action -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType class RestCallResult : HttpWsCallResult { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt index 8e898db58b..8c354f07c6 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/link/RestLinkValueUpdater.kt @@ -3,7 +3,7 @@ package org.evomaster.core.problem.rest.link import com.fasterxml.jackson.databind.ObjectMapper import org.evomaster.core.problem.rest.data.RestCallAction import org.evomaster.core.problem.rest.data.RestCallResult -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType object RestLinkValueUpdater { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt index c151cbdff1..5432418a83 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/schema/OpenApiAccess.kt @@ -18,7 +18,8 @@ import java.net.URI import java.net.URL import java.nio.file.Files import java.nio.file.Paths -import jakarta.ws.rs.core.Response +import javax.ws.rs.client.ClientBuilder +import javax.ws.rs.core.Response /** * Created by arcuri82 on 22-Jan-20. diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt index a804088253..4a094dc2dd 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/RestIndividualBuilder.kt @@ -11,8 +11,10 @@ import org.evomaster.core.problem.rest.data.RestIndividual import org.evomaster.core.problem.rest.data.RestPath import org.evomaster.core.problem.rest.service.sampler.AbstractRestSampler import org.evomaster.core.search.EvaluatedIndividual +import org.evomaster.core.search.action.EnvironmentAction import org.evomaster.core.search.service.Randomness import org.evomaster.core.sql.SqlAction +import javax.ws.rs.POST /** diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt index 67bfe89775..f3ae8c6ad6 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/AbstractRestFitness.kt @@ -70,11 +70,11 @@ import java.net.URLEncoder import java.nio.charset.StandardCharsets import javax.annotation.PostConstruct import javax.inject.Inject -import jakarta.ws.rs.ProcessingException -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.client.Invocation -import jakarta.ws.rs.core.MediaType -import jakarta.ws.rs.core.NewCookie +import javax.ws.rs.ProcessingException +import javax.ws.rs.client.Entity +import javax.ws.rs.client.Invocation +import javax.ws.rs.core.MediaType +import javax.ws.rs.core.NewCookie abstract class AbstractRestFitness : HttpWsFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt index cc3a524990..bc93bafb9a 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/BlackBoxRestFitness.kt @@ -14,10 +14,12 @@ import org.evomaster.core.problem.rest.service.CallGraphService import org.evomaster.core.search.action.ActionResult import org.evomaster.core.search.EvaluatedIndividual import org.evomaster.core.search.FitnessValue +import org.evomaster.core.search.StructuralElement import org.evomaster.core.utils.CollectionUtils import org.slf4j.Logger import org.slf4j.LoggerFactory -import jakarta.ws.rs.core.NewCookie +import javax.inject.Inject +import javax.ws.rs.core.NewCookie class BlackBoxRestFitness : RestFitness() { diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt index e4a3e244c7..d8e6abec88 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/service/fitness/ResourceRestFitness.kt @@ -23,7 +23,7 @@ import org.evomaster.core.search.FitnessValue import org.evomaster.core.search.Individual import org.slf4j.Logger import org.slf4j.LoggerFactory -import jakarta.ws.rs.core.NewCookie +import javax.ws.rs.core.NewCookie /** * take care of calculating/collecting fitness of [RestIndividual] diff --git a/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt b/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt index 8dbafaa3fc..550e996e6d 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/HttpClientFactory.kt @@ -1,15 +1,16 @@ package org.evomaster.core.remote import org.evomaster.core.Lazy -import org.glassfish.jersey.apache5.connector.Apache5ClientProperties -import org.glassfish.jersey.apache5.connector.Apache5ConnectorProvider +import org.glassfish.jersey.apache.connector.ApacheClientProperties +import org.glassfish.jersey.apache.connector.ApacheConnectorProvider import org.glassfish.jersey.client.ClientConfig import org.glassfish.jersey.client.ClientProperties +import org.glassfish.jersey.client.HttpUrlConnectorProvider import java.security.SecureRandom import java.security.cert.X509Certificate import javax.net.ssl.* -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.ClientBuilder +import javax.ws.rs.client.Client +import javax.ws.rs.client.ClientBuilder object HttpClientFactory { @@ -57,9 +58,9 @@ object HttpClientFactory { must use this connector, because default of Jersey has problems, eg, it does not handle PATCH properly and body payloads in GET/DELETE */ - .connectorProvider(Apache5ConnectorProvider()) + .connectorProvider(ApacheConnectorProvider()) .register(org.glassfish.jersey.jackson.JacksonFeature::class.java) - .property(Apache5ClientProperties.DISABLE_COOKIES, true) + .property(ApacheClientProperties.DISABLE_COOKIES, true) val client = ClientBuilder.newBuilder() .withConfig(config) diff --git a/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt b/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt index 20590cc877..0ed44812b7 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/TcpUtils.kt @@ -6,7 +6,7 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import java.io.IOException import java.net.* -import jakarta.ws.rs.ProcessingException +import javax.ws.rs.ProcessingException object TcpUtils { diff --git a/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt b/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt index b500904041..99555c765f 100644 --- a/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt +++ b/core/src/main/kotlin/org/evomaster/core/remote/service/RemoteControllerImplementation.kt @@ -20,14 +20,14 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import javax.annotation.PostConstruct import javax.annotation.PreDestroy -import jakarta.ws.rs.ProcessingException -import jakarta.ws.rs.client.Client -import jakarta.ws.rs.client.ClientBuilder -import jakarta.ws.rs.client.Entity -import jakarta.ws.rs.client.WebTarget -import jakarta.ws.rs.core.GenericType -import jakarta.ws.rs.core.MediaType -import jakarta.ws.rs.core.Response +import javax.ws.rs.ProcessingException +import javax.ws.rs.client.Client +import javax.ws.rs.client.ClientBuilder +import javax.ws.rs.client.Entity +import javax.ws.rs.client.WebTarget +import javax.ws.rs.core.GenericType +import javax.ws.rs.core.MediaType +import javax.ws.rs.core.Response /** * We split it from its interface, to be able to stub it away in the integration tests diff --git a/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt b/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt index 7d762206b0..8ac07a22bb 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/PythonTestCaseWriterTest.kt @@ -12,7 +12,7 @@ import org.evomaster.core.search.EvaluatedIndividual import org.evomaster.core.search.FitnessValue import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType class PythonTestCaseWriterTest : WriterTestBase(){ diff --git a/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt b/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt index 418e06c83a..db0750a2ed 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/TestCaseWriterTest.kt @@ -34,7 +34,7 @@ import org.evomaster.core.search.gene.wrapper.OptionalGene import org.evomaster.core.sql.schema.TableId import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType class TestCaseWriterTest : WriterTestBase(){ diff --git a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt index 4fb6db241f..30aed35981 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionNamingStrategyTest.kt @@ -19,7 +19,7 @@ import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import java.util.* import java.util.Collections.singletonList -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType open class RestActionNamingStrategyTest { diff --git a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt index de2715ed80..744721a635 100644 --- a/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt +++ b/core/src/test/kotlin/org/evomaster/core/output/naming/RestActionTestCaseUtils.kt @@ -38,7 +38,7 @@ import org.evomaster.core.sql.SqlAction import org.evomaster.core.sql.SqlActionResult import java.util.* import java.util.Collections.singletonList -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType object RestActionTestCaseUtils { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt index 3010656fb0..f017f027a8 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestCallResultTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import java.util.stream.Stream -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType internal class RestCallResultTest { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt index aa91e670b3..db19aa2e1d 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestResponseFeederTest.kt @@ -13,7 +13,7 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType class RestResponseFeederTest{ diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt index e9c944c250..5ae20347f4 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestSchemaOraclesTest.kt @@ -8,7 +8,7 @@ import org.evomaster.core.problem.rest.schema.RestSchema import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import jakarta.ws.rs.core.MediaType +import javax.ws.rs.core.MediaType class RestSchemaOraclesTest{ diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt index 82e23205ca..4f7fa87a73 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/oracle/HttpSemanticsOracleTest.kt @@ -416,12 +416,12 @@ class HttpSemanticsOracleTest { val putResult = RestCallResult(put.getLocalId()).apply { setStatusCode(putResponseStatus) setBody("{}") - setBodyType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) + setBodyType(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) } val getResult = RestCallResult(get.getLocalId()).apply { setStatusCode(getResponseStatus) setBody(getResponseBody) - setBodyType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) + setBodyType(javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE) } return HttpSemanticsOracle.hasMismatchedPutResponse( From a81019083d5394e73fcf30132dce48dc9f9a7e67 Mon Sep 17 00:00:00 2001 From: arcuri82 Date: Sun, 28 Jun 2026 22:05:20 +0200 Subject: [PATCH 6/6] clarification --- core-parent/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/core-parent/pom.xml b/core-parent/pom.xml index 0238e69f7d..b94d8e4666 100644 --- a/core-parent/pom.xml +++ b/core-parent/pom.xml @@ -14,6 +14,7 @@ ${project.groupId}:${project.artifactId} + 2.48 1.0.64