From 6dd7d09ba04505c1767ed63e42eaf27f985308dc Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Mon, 11 May 2020 18:00:07 +0100 Subject: [PATCH] Revert "HHH-13950 Apply the mass replace script to switch to Jakarta Validation API" This reverts commit 60abc8aa764929920478888d1d6b08b95df3846a. --- .../userguide/appendices/Configurations.adoc | 4 ++-- hibernate-core/hibernate-core.gradle | 10 +++++----- .../BeanValidationEventListener.java | 12 +++++------ .../BeanValidationIntegrator.java | 2 +- .../beanvalidation/GroupsPerOperation.java | 2 +- .../HibernateTraversableResolver.java | 4 ++-- .../cfg/beanvalidation/TypeSafeActivator.java | 20 +++++++++---------- .../beanvalidation/BeanValidationTest.java | 2 +- .../jpa/test/beanvalidation/CupHolder.java | 4 ++-- .../jpa/test/beanvalidation/ValidTitle.java | 6 +++--- .../ValidatorFactory2PhaseInjectionTest.java | 4 ++-- .../NativeQueryOrdinalParametersTest.java | 4 ++-- .../annotations/beanvalidation/Address.java | 12 +++++------ .../BeanValidationAutoTest.java | 2 +- .../BeanValidationDisabledTest.java | 2 +- .../BeanValidationGroupsTest.java | 6 +++--- .../BeanValidationProvidedFactoryTest.java | 10 +++++----- .../annotations/beanvalidation/Button.java | 4 ++-- .../annotations/beanvalidation/Color.java | 2 +- .../annotations/beanvalidation/CupHolder.java | 4 ++-- .../DDLWithoutCallbackTest.java | 2 +- .../annotations/beanvalidation/Display.java | 2 +- .../beanvalidation/DisplayConnector.java | 4 ++-- .../HibernateTraversableResolverTest.java | 4 ++-- .../MergeNotNullCollectionTest.java | 4 ++-- ...rgeNotNullCollectionUsingIdentityTest.java | 4 ++-- .../annotations/beanvalidation/MinMax.java | 4 ++-- .../beanvalidation/PowerSupply.java | 4 ++-- .../test/annotations/beanvalidation/Rock.java | 2 +- .../annotations/beanvalidation/Screen.java | 4 ++-- .../test/annotations/beanvalidation/Tv.java | 10 +++++----- .../annotations/beanvalidation/TvOwner.java | 2 +- ...EmbeddableWithOneToMany_HHH_8564_Test.java | 6 +++--- .../test/annotations/onetomany/A.java | 2 +- .../test/annotations/onetomany/B.java | 2 +- .../test/annotations/onetomany/C.java | 2 +- .../onetoone/hhh9798/Shipment.java | 2 +- .../annotations/uniqueconstraint/House.java | 2 +- .../UninitializedAssociationsInCacheTest.java | 2 +- .../mapsid/MapsIdOneToOneSelectTest.java | 2 +- .../test/formulajoin/AnnotatedMaster.java | 2 +- 41 files changed, 92 insertions(+), 92 deletions(-) diff --git a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc index a34564ed6f..9e5c0b66cf 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc @@ -385,8 +385,8 @@ Unless specified, the JDBC Driver uses the default JVM time zone. If a different This setting applies to Oracle Dialect only, and it specifies whether `byte[]` or `Byte[]` arrays should be mapped to the deprecated `LONG RAW` (when this configuration property value is `true`) or to a `BLOB` column type (when this configuration property value is `false`). ==== Bean Validation options -`*javax.persistence.validation.factory*` (e.g. `jakarta.validation.ValidationFactory` implementation):: -Specify the `jakarta.validation.ValidationFactory` implementation to use for Bean Validation. +`*javax.persistence.validation.factory*` (e.g. `javax.validation.ValidationFactory` implementation):: +Specify the `javax.validation.ValidationFactory` implementation to use for Bean Validation. `*hibernate.check_nullability*` (e.g. `true` or `false`):: Enable nullability checking. Raises an exception if a property marked as not-null is null. diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index b889ea93fb..9ebf39b72f 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -138,11 +138,11 @@ jar { 'javax.security.auth;resolution:=optional', // Make javax.security.jacc optional and do not reference a version range (because that's what we used to do) 'javax.security.jacc;resolution:=optional;version=!', - // Make jakarta.validation optional and do not reference a version range (because that's what we used to do) - 'jakarta.validation;resolution:=optional;version=!', - 'jakarta.validation.constraints;resolution:=optional;version=!', - 'jakarta.validation.groups;resolution:=optional;version=!', - 'jakarta.validation.metadata;resolution:=optional;version=!', + // Make javax.validation optional and do not reference a version range (because that's what we used to do) + 'javax.validation;resolution:=optional;version=!', + 'javax.validation.constraints;resolution:=optional;version=!', + 'javax.validation.groups;resolution:=optional;version=!', + 'javax.validation.metadata;resolution:=optional;version=!', // Make javax.enterprise optional and do not reference a version range (because that's what we used to do) '!javax.enterprise*', 'javax.enterprise.context.spi;resolution:=optional;version=!', diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java index 3163620548..c147e7486e 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationEventListener.java @@ -10,12 +10,12 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.TraversableResolver; -import jakarta.validation.Validation; -import jakarta.validation.Validator; -import jakarta.validation.ValidatorFactory; +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; +import javax.validation.TraversableResolver; +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; import org.hibernate.EntityMode; import org.hibernate.boot.internal.ClassLoaderAccessImpl; diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java index 8d47b39355..94dcbe2e2e 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java @@ -32,7 +32,7 @@ public class BeanValidationIntegrator implements Integrator { public static final String APPLY_CONSTRAINTS = "hibernate.validator.apply_to_ddl"; - public static final String BV_CHECK_CLASS = "jakarta.validation.Validation"; + public static final String BV_CHECK_CLASS = "javax.validation.Validation"; public static final String MODE_PROPERTY = "javax.persistence.validation.mode"; diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/GroupsPerOperation.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/GroupsPerOperation.java index 9faa9fe74c..eb359d57d6 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/GroupsPerOperation.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/GroupsPerOperation.java @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import jakarta.validation.groups.Default; +import javax.validation.groups.Default; import org.hibernate.HibernateException; import org.hibernate.boot.registry.classloading.spi.ClassLoadingException; diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/HibernateTraversableResolver.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/HibernateTraversableResolver.java index ff0e343e89..673e3fbdeb 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/HibernateTraversableResolver.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/HibernateTraversableResolver.java @@ -9,8 +9,8 @@ import java.lang.annotation.ElementType; import java.util.HashSet; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import jakarta.validation.Path; -import jakarta.validation.TraversableResolver; +import javax.validation.Path; +import javax.validation.TraversableResolver; import org.hibernate.Hibernate; import org.hibernate.annotations.common.AssertionFailure; diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/TypeSafeActivator.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/TypeSafeActivator.java index 75b0f8e500..50e3ee850f 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/TypeSafeActivator.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/TypeSafeActivator.java @@ -15,16 +15,16 @@ import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; -import jakarta.validation.constraints.Digits; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import jakarta.validation.metadata.BeanDescriptor; -import jakarta.validation.metadata.ConstraintDescriptor; -import jakarta.validation.metadata.PropertyDescriptor; +import javax.validation.Validation; +import javax.validation.ValidatorFactory; +import javax.validation.constraints.Digits; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import javax.validation.metadata.BeanDescriptor; +import javax.validation.metadata.ConstraintDescriptor; +import javax.validation.metadata.PropertyDescriptor; import org.hibernate.AssertionFailure; import org.hibernate.MappingException; diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/BeanValidationTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/BeanValidationTest.java index 0684e95193..7e811e2787 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/BeanValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/BeanValidationTest.java @@ -10,7 +10,7 @@ import java.math.BigDecimal; import java.util.Map; import javax.persistence.EntityManager; import javax.persistence.RollbackException; -import jakarta.validation.ConstraintViolationException; +import javax.validation.ConstraintViolationException; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.beanvalidation.ValidationMode; diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/CupHolder.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/CupHolder.java index cd2ab6ca8e..1a5c3f064c 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/CupHolder.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/CupHolder.java @@ -10,8 +10,8 @@ import java.math.BigDecimal; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.Max; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidTitle.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidTitle.java index 6378352309..6428959892 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidTitle.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidTitle.java @@ -9,9 +9,9 @@ package org.hibernate.jpa.test.beanvalidation; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import jakarta.validation.Constraint; -import jakarta.validation.Payload; -import jakarta.validation.constraints.Size; +import javax.validation.Constraint; +import javax.validation.Payload; +import javax.validation.constraints.Size; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.FIELD; diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidatorFactory2PhaseInjectionTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidatorFactory2PhaseInjectionTest.java index 9a2cc326a9..d567c9c22f 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidatorFactory2PhaseInjectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/beanvalidation/ValidatorFactory2PhaseInjectionTest.java @@ -10,8 +10,8 @@ import java.net.URL; import java.util.Collections; import javax.persistence.EntityManagerFactory; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; +import javax.validation.Validation; +import javax.validation.ValidatorFactory; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.HibernatePersistenceProvider; diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryOrdinalParametersTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryOrdinalParametersTest.java index ad5478d73e..39824843d1 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryOrdinalParametersTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryOrdinalParametersTest.java @@ -14,8 +14,8 @@ import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.Query; import javax.persistence.Table; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import org.hibernate.Session; import org.hibernate.dialect.PostgreSQL82Dialect; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Address.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Address.java index 4c55e815ca..14c8f228e2 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Address.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Address.java @@ -9,12 +9,12 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Transient; -import jakarta.validation.constraints.AssertTrue; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Pattern; -import jakarta.validation.constraints.Size; +import javax.validation.constraints.AssertTrue; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; @Entity public class Address { diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationAutoTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationAutoTest.java index aa92c809e9..89226d1d0f 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationAutoTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationAutoTest.java @@ -7,7 +7,7 @@ package org.hibernate.test.annotations.beanvalidation; import java.math.BigDecimal; -import jakarta.validation.ConstraintViolationException; +import javax.validation.ConstraintViolationException; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationDisabledTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationDisabledTest.java index d1d387f70c..7c0db05eba 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationDisabledTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationDisabledTest.java @@ -8,7 +8,7 @@ package org.hibernate.test.annotations.beanvalidation; import java.math.BigDecimal; import java.util.Map; -import jakarta.validation.ConstraintViolationException; +import javax.validation.ConstraintViolationException; import org.hibernate.Session; import org.hibernate.Transaction; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationGroupsTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationGroupsTest.java index 076f4887fb..9147e365c7 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationGroupsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationGroupsTest.java @@ -8,9 +8,9 @@ package org.hibernate.test.annotations.beanvalidation; import java.lang.annotation.Annotation; import java.math.BigDecimal; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.groups.Default; +import javax.validation.ConstraintViolationException; +import javax.validation.constraints.NotNull; +import javax.validation.groups.Default; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java index 5333ba5765..76b4cd707a 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/BeanValidationProvidedFactoryTest.java @@ -8,10 +8,10 @@ package org.hibernate.test.annotations.beanvalidation; import java.math.BigDecimal; import java.util.Locale; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.MessageInterpolator; -import jakarta.validation.Validation; -import jakarta.validation.ValidatorFactory; +import javax.validation.ConstraintViolationException; +import javax.validation.MessageInterpolator; +import javax.validation.Validation; +import javax.validation.ValidatorFactory; import org.junit.Test; @@ -66,7 +66,7 @@ public class BeanValidationProvidedFactoryTest extends BaseCoreFunctionalTestCas return interpolate( s, context ); } }; - final jakarta.validation.Configuration configuration = Validation.byDefaultProvider().configure(); + final javax.validation.Configuration configuration = Validation.byDefaultProvider().configure(); configuration.messageInterpolator( messageInterpolator ); ValidatorFactory vf = configuration.buildValidatorFactory(); cfg.getProperties().put( "javax.persistence.validation.factory", vf ); diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Button.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Button.java index d7efde76f3..02a1e11227 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Button.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Button.java @@ -8,8 +8,8 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.Column; import javax.persistence.Embeddable; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.Max; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Color.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Color.java index c85d0e3c43..9e6853f378 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Color.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Color.java @@ -9,7 +9,7 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/CupHolder.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/CupHolder.java index 9a0127053e..223a83cb73 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/CupHolder.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/CupHolder.java @@ -10,8 +10,8 @@ import java.math.BigDecimal; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.Max; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java index a58507b340..ea50a0ba5c 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DDLWithoutCallbackTest.java @@ -12,7 +12,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.PersistenceException; -import jakarta.validation.ConstraintViolationException; +import javax.validation.ConstraintViolationException; import org.hibernate.Session; import org.hibernate.Transaction; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Display.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Display.java index f60a8564cb..0aa6838209 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Display.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Display.java @@ -9,7 +9,7 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DisplayConnector.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DisplayConnector.java index f0ef5cadb9..f170ea6f2f 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DisplayConnector.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/DisplayConnector.java @@ -9,8 +9,8 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.CascadeType; import javax.persistence.Embeddable; import javax.persistence.ManyToOne; -import jakarta.validation.Valid; -import jakarta.validation.constraints.Min; +import javax.validation.Valid; +import javax.validation.constraints.Min; /** diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java index a062151143..ac542c9c29 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/HibernateTraversableResolverTest.java @@ -7,8 +7,8 @@ package org.hibernate.test.annotations.beanvalidation; import java.math.BigDecimal; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; +import javax.validation.ConstraintViolation; +import javax.validation.ConstraintViolationException; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionTest.java index 98205bd80e..87b68ea375 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionTest.java @@ -14,8 +14,8 @@ import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.constraints.NotNull; +import javax.validation.ConstraintViolationException; +import javax.validation.constraints.NotNull; import org.hibernate.Session; import org.hibernate.Transaction; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java index b8409e2aa6..15e9f60b00 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MergeNotNullCollectionUsingIdentityTest.java @@ -16,8 +16,8 @@ import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.constraints.NotNull; +import javax.validation.ConstraintViolationException; +import javax.validation.constraints.NotNull; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MinMax.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MinMax.java index 02560cf90b..6ec1d092c8 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MinMax.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/MinMax.java @@ -10,8 +10,8 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Column; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; /** * @author Hardy Ferentschik diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/PowerSupply.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/PowerSupply.java index 00193885d9..ffa10b6ea8 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/PowerSupply.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/PowerSupply.java @@ -11,8 +11,8 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import jakarta.validation.constraints.Max; -import jakarta.validation.constraints.Min; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Rock.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Rock.java index 52acdbc48c..6006b3466d 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Rock.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Rock.java @@ -7,7 +7,7 @@ package org.hibernate.test.annotations.beanvalidation; import javax.persistence.Entity; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Screen.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Screen.java index a10bbc4656..75a175ce28 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Screen.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Screen.java @@ -15,8 +15,8 @@ import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotNull; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Tv.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Tv.java index 417058611a..48f3333cfd 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Tv.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/Tv.java @@ -13,11 +13,11 @@ import javax.persistence.Embeddable; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Column; -import jakarta.validation.Valid; -import jakarta.validation.constraints.Future; -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; +import javax.validation.Valid; +import javax.validation.constraints.Future; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; import org.hibernate.validator.constraints.Length; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/TvOwner.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/TvOwner.java index 387ea8d2a8..5352b2461e 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/TvOwner.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/beanvalidation/TvOwner.java @@ -10,7 +10,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.ManyToOne; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Emmanuel Bernard diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/embeddables/collection/EmbeddableWithOneToMany_HHH_8564_Test.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/embeddables/collection/EmbeddableWithOneToMany_HHH_8564_Test.java index 11597c5799..f69c38aaf7 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/embeddables/collection/EmbeddableWithOneToMany_HHH_8564_Test.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/embeddables/collection/EmbeddableWithOneToMany_HHH_8564_Test.java @@ -17,9 +17,9 @@ import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Version; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Pattern; -import jakarta.validation.constraints.Size; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Size; import org.hibernate.AnnotationException; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/A.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/A.java index 5bbeaa0073..b65c0d5366 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/A.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/A.java @@ -14,7 +14,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.OrderBy; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import org.hibernate.annotations.Cascade; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/B.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/B.java index ebff403643..6d2fa0f478 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/B.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/B.java @@ -16,7 +16,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.OrderBy; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import org.hibernate.annotations.Cascade; diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/C.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/C.java index acc6ec444a..fa54e2d80c 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/C.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetomany/C.java @@ -10,7 +10,7 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Peter Kotula diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/hhh9798/Shipment.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/hhh9798/Shipment.java index 32f8fa52de..d0a99a062d 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/hhh9798/Shipment.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/onetoone/hhh9798/Shipment.java @@ -14,7 +14,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.OneToOne; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import java.util.Date; @Entity diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/House.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/House.java index e7f48d0a92..651d4533b1 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/House.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/uniqueconstraint/House.java @@ -11,7 +11,7 @@ import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.UniqueConstraint; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; /** * @author Manuel Bernhardt diff --git a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java index d6ddc6e6de..7878831fd8 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java @@ -11,7 +11,7 @@ import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; -import jakarta.validation.constraints.AssertTrue; +import javax.validation.constraints.AssertTrue; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicLong; diff --git a/hibernate-core/src/test/java/org/hibernate/test/criteria/mapsid/MapsIdOneToOneSelectTest.java b/hibernate-core/src/test/java/org/hibernate/test/criteria/mapsid/MapsIdOneToOneSelectTest.java index 030cdf0503..3f833006a5 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/criteria/mapsid/MapsIdOneToOneSelectTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/criteria/mapsid/MapsIdOneToOneSelectTest.java @@ -16,7 +16,7 @@ import javax.persistence.OneToOne; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Root; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; diff --git a/hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedMaster.java b/hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedMaster.java index dd985d5873..0c0696ee96 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedMaster.java +++ b/hibernate-core/src/test/java/org/hibernate/test/formulajoin/AnnotatedMaster.java @@ -11,7 +11,7 @@ import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; -import jakarta.validation.constraints.NotNull; +import javax.validation.constraints.NotNull; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode;