From 09036fa95ca5d2e60125cd094c56ccfc723b7b76 Mon Sep 17 00:00:00 2001 From: Michael Kreis Date: Thu, 15 Dec 2022 10:02:31 +0100 Subject: [PATCH] update to jakarta.validation API --- build.gradle.kts | 6 +++--- .../jackson/beanvalidation/BeanValidationTest.java | 8 ++++---- .../jackson/beanvalidation/JavaOnlyTest.java | 8 ++++---- .../beanvalidation/AbstractConstraintDescriptor.java | 12 ++++++------ .../jackson/beanvalidation/BeanValidationModule.java | 4 ++-- .../jackson/beanvalidation/InvalidObject.java | 2 +- .../jackson/beanvalidation/JsonConstraints.java | 6 +++--- .../jackson/beanvalidation/JsonRequired.java | 4 ++-- .../jackson/beanvalidation/JsonValidInput.java | 4 ++-- .../KotlinValidatingBeanDeserializer.java | 8 ++++---- .../beanvalidation/NotNullConstraintDescriptor.java | 4 ++-- .../jackson/beanvalidation/PropertyPathUtils.java | 2 +- .../beanvalidation/ValidatingBeanDeserializer.java | 6 +++--- .../beanvalidation/ValidatingValueInstantiator.java | 12 ++++++------ .../beanvalidation/ValidationAwareBeanProperty.java | 4 ++-- .../beanvalidation/ValidationAwareFieldProperty.java | 2 +- .../ValidationAwareMethodProperty.java | 2 +- .../ValidationAwarePropertyValueBuffer.java | 6 +++--- .../ValidationBeanDeserializerModifier.java | 4 ++-- .../jackson/beanvalidation/path/AbstractNode.java | 2 +- .../jackson/beanvalidation/path/BeanNode.java | 4 ++-- .../jackson/beanvalidation/path/ConstructorNode.java | 4 ++-- .../jackson/beanvalidation/path/ParameterNode.java | 4 ++-- .../jackson/beanvalidation/path/PathBuilder.java | 2 +- .../jackson/beanvalidation/path/PathBuilderImpl.java | 4 ++-- .../jackson/beanvalidation/path/PathImpl.java | 2 +- .../jackson/beanvalidation/path/PathUtils.java | 4 ++-- .../jackson/beanvalidation/path/PropertyNode.java | 4 ++-- .../jackson/beanvalidation/path/package-info.java | 4 +++- .../violation/AbstractConstraintViolation.java | 4 ++-- .../violation/CompositeConstraintViolation.java | 6 +++--- .../violation/ConstraintViolationImpl.java | 4 ++-- .../violation/ConstraintViolationUtils.java | 8 ++++---- .../violation/ConstraintViolationWithNewPath.java | 6 +++--- .../violation/MessageInterpolatorContextImpl.java | 6 +++--- .../beanvalidation/violation/package-info.java | 4 +++- .../jackson/beanvalidation/AbstractValidationTest.kt | 6 +++--- .../jackson/beanvalidation/CreatorValidationTest.kt | 4 ++-- .../jackson/beanvalidation/CrossValidationTest.kt | 2 +- .../jackson/beanvalidation/KotlinValidationTest.kt | 2 +- .../jackson/beanvalidation/NestedValidationTest.kt | 4 ++-- .../jackson/beanvalidation/RequiredPropertiesTest.kt | 2 +- .../jackson/beanvalidation/SimpleValidationTest.kt | 2 +- .../jackson/beanvalidation/ValidInputTest.kt | 2 +- .../assertions/ConstraintViolationAssertions.kt | 2 +- 45 files changed, 103 insertions(+), 99 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b6ad4d7..644fe41 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,7 +34,7 @@ tasks.named("check") { dependencies { api("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") - api("javax.validation:validation-api:2.0.1.Final") + api("jakarta.validation:jakarta.validation-api:3.0.2") compileOnly("com.google.code.findbugs:jsr305:3.0.2") compileOnly(kotlin("stdlib-jdk8")) @@ -51,13 +51,13 @@ dependencies { testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion") testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion") testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") - testImplementation("org.hibernate.validator:hibernate-validator:6.2.0.Final") + testImplementation("org.hibernate.validator:hibernate-validator:7.0.2.Final") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") testRuntimeOnly("ch.qos.logback:logback-classic:1.2.3") "javaOnlyTestImplementation"("org.junit.jupiter:junit-jupiter-api") - "javaOnlyTestImplementation"("org.hibernate.validator:hibernate-validator:6.2.0.Final") + "javaOnlyTestImplementation"("org.hibernate.validator:hibernate-validator:7.0.2.Final") } diff --git a/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/BeanValidationTest.java b/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/BeanValidationTest.java index d8fbdf0..7945714 100644 --- a/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/BeanValidationTest.java +++ b/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/BeanValidationTest.java @@ -10,10 +10,10 @@ import org.unbrokendome.jackson.beanvalidation.BeanValidationModule; import org.unbrokendome.jackson.beanvalidation.JsonValidated; -import javax.validation.ConstraintViolationException; -import javax.validation.Validation; -import javax.validation.ValidatorFactory; -import javax.validation.constraints.NotNull; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.Validation; +import jakarta.validation.ValidatorFactory; +import jakarta.validation.constraints.NotNull; class BeanValidationTest { diff --git a/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/JavaOnlyTest.java b/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/JavaOnlyTest.java index 1a4cb3d..cec5bd0 100644 --- a/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/JavaOnlyTest.java +++ b/src/java-only-test/java/org/unbrokendome/jackson/beanvalidation/JavaOnlyTest.java @@ -7,10 +7,10 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import javax.validation.ConstraintViolationException; -import javax.validation.Validation; -import javax.validation.ValidatorFactory; -import javax.validation.constraints.NotNull; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.Validation; +import jakarta.validation.ValidatorFactory; +import jakarta.validation.constraints.NotNull; class JavaOnlyTest { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/AbstractConstraintDescriptor.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/AbstractConstraintDescriptor.java index f87b563..3a48a92 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/AbstractConstraintDescriptor.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/AbstractConstraintDescriptor.java @@ -1,11 +1,11 @@ package org.unbrokendome.jackson.beanvalidation; -import javax.validation.ConstraintTarget; -import javax.validation.ConstraintValidator; -import javax.validation.Payload; -import javax.validation.ValidationException; -import javax.validation.metadata.ConstraintDescriptor; -import javax.validation.metadata.ValidateUnwrappedValue; +import jakarta.validation.ConstraintTarget; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.Payload; +import jakarta.validation.ValidationException; +import jakarta.validation.metadata.ConstraintDescriptor; +import jakarta.validation.metadata.ValidateUnwrappedValue; import java.lang.annotation.Annotation; import java.util.Arrays; import java.util.Collections; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/BeanValidationModule.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/BeanValidationModule.java index e893098..66e735e 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/BeanValidationModule.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/BeanValidationModule.java @@ -5,8 +5,8 @@ import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; -import javax.validation.ConstraintViolationException; -import javax.validation.ValidatorFactory; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.ValidatorFactory; import java.io.IOException; import java.util.EnumSet; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/InvalidObject.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/InvalidObject.java index e32ce1f..d24db33 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/InvalidObject.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/InvalidObject.java @@ -1,6 +1,6 @@ package org.unbrokendome.jackson.beanvalidation; -import javax.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolation; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonConstraints.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonConstraints.java index 4b4da41..b44f974 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonConstraints.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonConstraints.java @@ -1,8 +1,8 @@ package org.unbrokendome.jackson.beanvalidation; import javax.annotation.Nullable; -import javax.validation.Payload; -import javax.validation.constraints.NotNull; +import jakarta.validation.Payload; +import jakarta.validation.constraints.NotNull; import java.lang.annotation.Annotation; @@ -104,7 +104,7 @@ static JsonRequired required(@Nullable String messageTemplate) { private static final class DefaultNotNull extends AbstractDefaultAnnotation implements NotNull { - private static final String DEFAULT_MESSAGE = "{javax.validation.constraints.NotNull.message}"; + private static final String DEFAULT_MESSAGE = "{jakarta.validation.constraints.NotNull.message}"; @Override public String message() { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonRequired.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonRequired.java index c726caa..9516f61 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonRequired.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonRequired.java @@ -1,7 +1,7 @@ package org.unbrokendome.jackson.beanvalidation; -import javax.validation.Payload; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.Payload; +import jakarta.validation.metadata.ConstraintDescriptor; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonValidInput.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonValidInput.java index 4bac94d..4afe459 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonValidInput.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/JsonValidInput.java @@ -2,8 +2,8 @@ import com.fasterxml.jackson.databind.exc.MismatchedInputException; -import javax.validation.Payload; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.Payload; +import jakarta.validation.metadata.ConstraintDescriptor; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/KotlinValidatingBeanDeserializer.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/KotlinValidatingBeanDeserializer.java index a1c9a38..6b3ff66 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/KotlinValidatingBeanDeserializer.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/KotlinValidatingBeanDeserializer.java @@ -6,10 +6,10 @@ import com.fasterxml.jackson.databind.deser.SettableBeanProperty; import javax.annotation.Nullable; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.ValidatorFactory; -import javax.validation.constraints.NotNull; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.ValidatorFactory; +import jakarta.validation.constraints.NotNull; import java.io.IOException; import java.util.Collections; import java.util.HashSet; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/NotNullConstraintDescriptor.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/NotNullConstraintDescriptor.java index 76018ce..950db0b 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/NotNullConstraintDescriptor.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/NotNullConstraintDescriptor.java @@ -1,7 +1,7 @@ package org.unbrokendome.jackson.beanvalidation; -import javax.validation.Payload; -import javax.validation.constraints.NotNull; +import jakarta.validation.Payload; +import jakarta.validation.constraints.NotNull; class NotNullConstraintDescriptor extends AbstractConstraintDescriptor { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/PropertyPathUtils.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/PropertyPathUtils.java index 56fab93..0a777d8 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/PropertyPathUtils.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/PropertyPathUtils.java @@ -8,7 +8,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.Path; +import jakarta.validation.Path; import java.lang.reflect.Constructor; import java.util.Collection; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingBeanDeserializer.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingBeanDeserializer.java index e63c844..c76c000 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingBeanDeserializer.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingBeanDeserializer.java @@ -17,9 +17,9 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.*; -import javax.validation.constraints.NotNull; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.*; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.metadata.ConstraintDescriptor; import java.io.IOException; import java.util.Collections; import java.util.HashSet; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingValueInstantiator.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingValueInstantiator.java index bfd9631..0089011 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingValueInstantiator.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidatingValueInstantiator.java @@ -12,12 +12,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.ElementKind; -import javax.validation.Path; -import javax.validation.ValidatorFactory; -import javax.validation.executable.ExecutableValidator; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ConstraintViolationException; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; +import jakarta.validation.ValidatorFactory; +import jakarta.validation.executable.ExecutableValidator; import java.io.IOException; import java.lang.reflect.Constructor; import java.lang.reflect.Member; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareBeanProperty.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareBeanProperty.java index 12377be..260d23e 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareBeanProperty.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareBeanProperty.java @@ -10,8 +10,8 @@ import com.fasterxml.jackson.databind.deser.impl.NullsConstantProvider; import com.fasterxml.jackson.databind.introspect.AnnotatedMember; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; import java.io.IOException; import java.lang.annotation.Annotation; import java.util.Set; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareFieldProperty.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareFieldProperty.java index 91abff0..f714945 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareFieldProperty.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareFieldProperty.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.deser.SettableBeanProperty; import com.fasterxml.jackson.databind.deser.impl.FieldProperty; -import javax.validation.Validator; +import jakarta.validation.Validator; final class ValidationAwareFieldProperty extends ValidationAwareBeanProperty { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareMethodProperty.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareMethodProperty.java index c6e27f3..56b42e0 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareMethodProperty.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwareMethodProperty.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.databind.deser.SettableBeanProperty; import com.fasterxml.jackson.databind.deser.impl.MethodProperty; -import javax.validation.Validator; +import jakarta.validation.Validator; final class ValidationAwareMethodProperty extends ValidationAwareBeanProperty { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwarePropertyValueBuffer.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwarePropertyValueBuffer.java index e400b7d..3b3c5c8 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwarePropertyValueBuffer.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationAwarePropertyValueBuffer.java @@ -13,9 +13,9 @@ import com.fasterxml.jackson.databind.util.ClassUtil; import org.unbrokendome.jackson.beanvalidation.violation.ConstraintViolationUtils; -import javax.validation.ConstraintViolation; -import javax.validation.MessageInterpolator; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.MessageInterpolator; +import jakarta.validation.metadata.ConstraintDescriptor; import java.util.Collections; import java.util.HashMap; import java.util.Map; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationBeanDeserializerModifier.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationBeanDeserializerModifier.java index 98def8a..2827ae9 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationBeanDeserializerModifier.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/ValidationBeanDeserializerModifier.java @@ -8,8 +8,8 @@ import com.fasterxml.jackson.databind.deser.impl.MethodProperty; import com.fasterxml.jackson.databind.deser.std.StdValueInstantiator; -import javax.validation.Validator; -import javax.validation.ValidatorFactory; +import jakarta.validation.Validator; +import jakarta.validation.ValidatorFactory; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/AbstractNode.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/AbstractNode.java index 3e8090e..f79889f 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/AbstractNode.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/AbstractNode.java @@ -2,7 +2,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.Path; +import jakarta.validation.Path; abstract class AbstractNode implements Path.Node { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/BeanNode.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/BeanNode.java index 937fa2d..42ee862 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/BeanNode.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/BeanNode.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; final class BeanNode extends AbstractNode implements Path.BeanNode { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ConstructorNode.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ConstructorNode.java index 02e4f6e..f76656c 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ConstructorNode.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ConstructorNode.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; import java.util.Collections; import java.util.List; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ParameterNode.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ParameterNode.java index 705760a..16b6267 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ParameterNode.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/ParameterNode.java @@ -1,8 +1,8 @@ package org.unbrokendome.jackson.beanvalidation.path; import javax.annotation.Nonnull; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; final class ParameterNode extends AbstractNode implements Path.ParameterNode { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilder.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilder.java index 1533e6d..526c731 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilder.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilder.java @@ -2,7 +2,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.Path; +import jakarta.validation.Path; import java.lang.reflect.Constructor; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilderImpl.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilderImpl.java index b23943c..7c529a4 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilderImpl.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathBuilderImpl.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathImpl.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathImpl.java index 5dcdd00..8468673 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathImpl.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathImpl.java @@ -1,7 +1,7 @@ package org.unbrokendome.jackson.beanvalidation.path; import javax.annotation.Nonnull; -import javax.validation.Path; +import jakarta.validation.Path; import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathUtils.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathUtils.java index 1afa108..f588751 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathUtils.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PathUtils.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; import java.util.Iterator; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PropertyNode.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PropertyNode.java index 83c38b0..68bf7a7 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PropertyNode.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/PropertyNode.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ElementKind; -import javax.validation.Path; +import jakarta.validation.ElementKind; +import jakarta.validation.Path; final class PropertyNode extends AbstractNode implements Path.PropertyNode { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/package-info.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/package-info.java index 6615b02..627f7dd 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/path/package-info.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/path/package-info.java @@ -1,2 +1,4 @@ -@javax.annotation.ParametersAreNonnullByDefault +@ParametersAreNonnullByDefault package org.unbrokendome.jackson.beanvalidation.path; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/AbstractConstraintViolation.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/AbstractConstraintViolation.java index 31da2b7..51d86e9 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/AbstractConstraintViolation.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/AbstractConstraintViolation.java @@ -1,7 +1,7 @@ package org.unbrokendome.jackson.beanvalidation.violation; -import javax.validation.ConstraintViolation; -import javax.validation.ValidationException; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.ValidationException; abstract class AbstractConstraintViolation implements ConstraintViolation { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/CompositeConstraintViolation.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/CompositeConstraintViolation.java index 9602221..5370cfb 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/CompositeConstraintViolation.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/CompositeConstraintViolation.java @@ -4,9 +4,9 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.ConstraintViolation; -import javax.validation.Path; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Path; +import jakarta.validation.metadata.ConstraintDescriptor; final class CompositeConstraintViolation extends AbstractRootedConstraintViolation { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationImpl.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationImpl.java index 99a33e7..1ccef62 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationImpl.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationImpl.java @@ -2,8 +2,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.validation.Path; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.Path; +import jakarta.validation.metadata.ConstraintDescriptor; final class ConstraintViolationImpl extends AbstractRootedConstraintViolation { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationUtils.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationUtils.java index 483ea85..22ca248 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationUtils.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationUtils.java @@ -1,10 +1,10 @@ package org.unbrokendome.jackson.beanvalidation.violation; import javax.annotation.Nullable; -import javax.validation.ConstraintViolation; -import javax.validation.MessageInterpolator; -import javax.validation.Path; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.MessageInterpolator; +import jakarta.validation.Path; +import jakarta.validation.metadata.ConstraintDescriptor; public final class ConstraintViolationUtils { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationWithNewPath.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationWithNewPath.java index f18f97a..52eba50 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationWithNewPath.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/ConstraintViolationWithNewPath.java @@ -1,8 +1,8 @@ package org.unbrokendome.jackson.beanvalidation.violation; -import javax.validation.ConstraintViolation; -import javax.validation.Path; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Path; +import jakarta.validation.metadata.ConstraintDescriptor; final class ConstraintViolationWithNewPath extends AbstractConstraintViolation { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/MessageInterpolatorContextImpl.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/MessageInterpolatorContextImpl.java index c8b378a..3ca3507 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/MessageInterpolatorContextImpl.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/MessageInterpolatorContextImpl.java @@ -1,9 +1,9 @@ package org.unbrokendome.jackson.beanvalidation.violation; import javax.annotation.Nullable; -import javax.validation.MessageInterpolator; -import javax.validation.ValidationException; -import javax.validation.metadata.ConstraintDescriptor; +import jakarta.validation.MessageInterpolator; +import jakarta.validation.ValidationException; +import jakarta.validation.metadata.ConstraintDescriptor; final class MessageInterpolatorContextImpl implements MessageInterpolator.Context { diff --git a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/package-info.java b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/package-info.java index a0ca7c6..8044374 100644 --- a/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/package-info.java +++ b/src/main/java/org/unbrokendome/jackson/beanvalidation/violation/package-info.java @@ -1,2 +1,4 @@ -@javax.annotation.ParametersAreNonnullByDefault +@ParametersAreNonnullByDefault package org.unbrokendome.jackson.beanvalidation.violation; + +import javax.annotation.ParametersAreNonnullByDefault; \ No newline at end of file diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/AbstractValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/AbstractValidationTest.kt index e5908ae..0c44caa 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/AbstractValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/AbstractValidationTest.kt @@ -4,9 +4,9 @@ import com.fasterxml.jackson.databind.ObjectMapper import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator import org.junit.jupiter.api.Assertions.assertDoesNotThrow import org.junit.jupiter.api.Assertions.assertThrows -import javax.validation.ConstraintViolation -import javax.validation.ConstraintViolationException -import javax.validation.Validation +import jakarta.validation.ConstraintViolation +import jakarta.validation.ConstraintViolationException +import jakarta.validation.Validation abstract class AbstractValidationTest { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CreatorValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CreatorValidationTest.kt index e819bd3..da42b79 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CreatorValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CreatorValidationTest.kt @@ -6,8 +6,8 @@ import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty import org.junit.jupiter.api.Test import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation -import javax.validation.Valid -import javax.validation.constraints.NotNull +import jakarta.validation.Valid +import jakarta.validation.constraints.NotNull class CreatorValidationTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CrossValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CrossValidationTest.kt index c8bbc57..972e204 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CrossValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/CrossValidationTest.kt @@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty import org.junit.jupiter.api.Test import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation -import javax.validation.constraints.AssertTrue +import jakarta.validation.constraints.AssertTrue class CrossValidationTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/KotlinValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/KotlinValidationTest.kt index 9f64d3e..c5ca87e 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/KotlinValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/KotlinValidationTest.kt @@ -14,7 +14,7 @@ import org.junit.jupiter.params.provider.ArgumentsProvider import org.junit.jupiter.params.provider.ArgumentsSource import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation import java.util.stream.Stream -import javax.validation.constraints.NotNull +import jakarta.validation.constraints.NotNull class KotlinValidationTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/NestedValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/NestedValidationTest.kt index 23628c3..c7d0c1e 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/NestedValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/NestedValidationTest.kt @@ -12,8 +12,8 @@ import org.junit.jupiter.params.provider.ArgumentsProvider import org.junit.jupiter.params.provider.ArgumentsSource import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation import java.util.stream.Stream -import javax.validation.Valid -import javax.validation.constraints.NotNull +import jakarta.validation.Valid +import jakarta.validation.constraints.NotNull class NestedValidationTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/RequiredPropertiesTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/RequiredPropertiesTest.kt index cb53b11..082882f 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/RequiredPropertiesTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/RequiredPropertiesTest.kt @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty import org.junit.jupiter.api.Test import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation -import javax.validation.constraints.NotNull +import jakarta.validation.constraints.NotNull class RequiredPropertiesTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/SimpleValidationTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/SimpleValidationTest.kt index e11bbfd..f7431a5 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/SimpleValidationTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/SimpleValidationTest.kt @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation import java.io.IOException -import javax.validation.constraints.NotNull +import jakarta.validation.constraints.NotNull class SimpleValidationTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/ValidInputTest.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/ValidInputTest.kt index bdd8459..f859753 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/ValidInputTest.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/ValidInputTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.unbrokendome.jackson.beanvalidation.assertions.hasViolation import java.time.LocalDate -import javax.validation.constraints.NotNull +import jakarta.validation.constraints.NotNull class ValidInputTest : AbstractValidationTest() { diff --git a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/assertions/ConstraintViolationAssertions.kt b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/assertions/ConstraintViolationAssertions.kt index 4521988..7f6e903 100644 --- a/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/assertions/ConstraintViolationAssertions.kt +++ b/src/test/kotlin/org/unbrokendome/jackson/beanvalidation/assertions/ConstraintViolationAssertions.kt @@ -4,7 +4,7 @@ import assertk.Assert import assertk.assertions.isInstanceOf import assertk.assertions.support.expected import assertk.assertions.support.show -import javax.validation.ConstraintViolation +import jakarta.validation.ConstraintViolation inline fun Assert>.hasConstraintClass() =