From 7284ad11f1c61f1fb39f24995e479ae4c61e53bd Mon Sep 17 00:00:00 2001 From: Jack Oehling Date: Fri, 19 Jul 2024 15:30:31 -0400 Subject: [PATCH] COMN-325: Migrate javax.validation to jakarta.validation --- json/pom.xml | 5 +++++ .../RecordSimilarityDeserializerUtilities.java | 4 ++-- model/pom.xml | 6 +++--- .../rosette/apimodel/AddressSimilarityRequest.java | 2 +- .../com/basistech/rosette/apimodel/CategoriesOptions.java | 2 +- .../main/java/com/basistech/rosette/apimodel/Entity.java | 2 +- .../com/basistech/rosette/apimodel/LanguageOptions.java | 8 ++++---- .../com/basistech/rosette/apimodel/LanguageWeight.java | 4 ++-- .../com/basistech/rosette/apimodel/MentionOffsets.java | 2 +- .../main/java/com/basistech/rosette/apimodel/Name.java | 2 +- .../rosette/apimodel/NameDeduplicationRequest.java | 4 ++-- .../basistech/rosette/apimodel/NameSimilarityRequest.java | 4 ++-- .../rosette/apimodel/NameTranslationRequest.java | 2 +- .../com/basistech/rosette/apimodel/TopicsOptions.java | 4 ++-- .../recordsimilarity/RecordSimilarityFieldInfo.java | 4 ++-- .../recordsimilarity/RecordSimilarityProperties.java | 2 +- .../recordsimilarity/RecordSimilarityRecords.java | 4 ++-- .../recordsimilarity/RecordSimilarityRequest.java | 4 ++-- .../recordsimilarity/RecordSimilarityResponse.java | 2 +- .../apimodel/recordsimilarity/records/AddressField.java | 2 +- .../apimodel/recordsimilarity/records/DateField.java | 2 +- .../apimodel/recordsimilarity/records/NameField.java | 2 +- pom.xml | 2 +- 23 files changed, 40 insertions(+), 35 deletions(-) diff --git a/json/pom.xml b/json/pom.xml index cbf1fc0c3..0332f418b 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -34,6 +34,11 @@ com.fasterxml.jackson.core jackson-databind + + jakarta.validation + jakarta.validation-api + ${jakarta-validation-api.version} + com.basistech.rosette rosette-api-model diff --git a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java index 8a611b9f7..9c5e07983 100644 --- a/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java +++ b/json/src/main/java/com/basistech/rosette/apimodel/jackson/recordsimilaritydeserializers/RecordSimilarityDeserializerUtilities.java @@ -31,8 +31,8 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.JsonNode; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo; import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField; diff --git a/model/pom.xml b/model/pom.xml index 47c86a8d1..14f970c24 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -39,9 +39,9 @@ common-api - javax.validation - validation-api - ${javax-validation-api.version} + jakarta.validation + jakarta.validation-api + ${jakarta-validation-api.version} com.basistech diff --git a/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java index e2e1c58bd..9e7b526a8 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/AddressSimilarityRequest.java @@ -19,7 +19,7 @@ import java.util.Map; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import lombok.Builder; import lombok.Value; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java index 72fef68f5..658136104 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/CategoriesOptions.java @@ -17,7 +17,7 @@ package com.basistech.rosette.apimodel; import com.basistech.rosette.annotations.JacksonMixin; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; import lombok.Builder; import lombok.Value; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java index 546b02806..34d750a65 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Entity.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Entity.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; +import jakarta.validation.Valid; import java.util.List; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java index 5007c3674..e7b48b537 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageOptions.java @@ -22,10 +22,10 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; -import javax.validation.constraints.Min; +import jakarta.validation.Valid; +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; +import jakarta.validation.constraints.Min; import java.util.Set; /** diff --git a/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java b/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java index 0dac287d6..72e472466 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/LanguageWeight.java @@ -22,8 +22,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; /** * language weight used to resolve ambiguous results diff --git a/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java b/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java index b03ebea0f..846be6258 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/MentionOffsets.java @@ -20,7 +20,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.Min; +import jakarta.validation.constraints.Min; /** * The start and end offset/index for a given mention in a string of text diff --git a/model/src/main/java/com/basistech/rosette/apimodel/Name.java b/model/src/main/java/com/basistech/rosette/apimodel/Name.java index 1df293b5b..73d7029a0 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/Name.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/Name.java @@ -21,7 +21,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * Class that represents a name. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java index 8856913f3..2165d3b0b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameDeduplicationRequest.java @@ -19,8 +19,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java index 866463f50..64d396ad9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameSimilarityRequest.java @@ -21,8 +21,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; /** * Request object for name-similarity. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java index aa585f0df..e1c3be6a9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/NameTranslationRequest.java @@ -22,7 +22,7 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; /** * Request for name translation. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java b/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java index b788f271d..04ad10f96 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/TopicsOptions.java @@ -19,8 +19,8 @@ import lombok.Builder; import lombok.Value; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; /** * Options for topics requests diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java index c53409cb4..8f3672613 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityFieldInfo.java @@ -17,12 +17,12 @@ package com.basistech.rosette.apimodel.recordsimilarity; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; @Jacksonized @Builder diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java index a402b907c..6c9fb1a64 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityProperties.java @@ -19,7 +19,7 @@ import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; import lombok.extern.jackson.Jacksonized; diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java index a21daa5a8..64678225b 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRecords.java @@ -20,11 +20,11 @@ import java.util.Map; import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Builder; import lombok.Value; -import javax.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; @Builder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java index 874e820af..34511c377 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityRequest.java @@ -18,11 +18,11 @@ import com.basistech.rosette.apimodel.Request; import com.fasterxml.jackson.annotation.JsonInclude; -import javax.validation.Valid; +import jakarta.validation.Valid; import lombok.Value; import lombok.Builder; -import javax.validation.constraints.NotNull; +import jakarta.validation.constraints.NotNull; import java.util.Map; @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java index c40094b3b..4bd89043e 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/RecordSimilarityResponse.java @@ -24,7 +24,7 @@ import com.basistech.rosette.apimodel.Response; -import javax.validation.Valid; +import jakarta.validation.Valid; /** * Response data model for comparison of two records. diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java index 1619dcee8..8ec4880e9 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/AddressField.java @@ -24,7 +24,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java index ba5b31c18..cd2ebdc1f 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/DateField.java @@ -23,7 +23,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java index b4eba359f..87cacf982 100644 --- a/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java +++ b/model/src/main/java/com/basistech/rosette/apimodel/recordsimilarity/records/NameField.java @@ -25,7 +25,7 @@ import lombok.experimental.SuperBuilder; import lombok.extern.jackson.Jacksonized; -import javax.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotBlank; @SuperBuilder @Value diff --git a/pom.xml b/pom.xml index 3bca9f6ca..4c682dfda 100644 --- a/pom.xml +++ b/pom.xml @@ -43,8 +43,8 @@ 3.6.0 1.17.0 + 3.1.0 1.13.0 - 2.0.1.Final 5.9.3 1.18.34 1.18.20.0