From 21deba3209aef31ce72525d04d5c241a219c0a5e Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Mon, 16 Dec 2024 11:00:49 +0100 Subject: [PATCH 1/3] [WFLY-20133] Upgrade Hibernate Validator to 9.0.0.CR1 in WildFly preview --- boms/preview-ee/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boms/preview-ee/pom.xml b/boms/preview-ee/pom.xml index b4950d4edde0..5daa062e73b5 100644 --- a/boms/preview-ee/pom.xml +++ b/boms/preview-ee/pom.xml @@ -53,7 +53,7 @@ 7.0.0.Alpha4 6.0.0.Final 6.0.Final - 9.0.0.Beta2 + 9.0.0.CR1 4.0.0.Beta1 From 860944de198fd6dc8bafcdfe941c90ea6962fe44 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Mon, 16 Dec 2024 11:01:40 +0100 Subject: [PATCH 2/3] [WFLY-20132] Upgrade Hibernate Validator to 8.0.2.Final --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 68f0f54ac260..60588ad1e87f 100644 --- a/pom.xml +++ b/pom.xml @@ -467,7 +467,7 @@ 7.0.3.Final 6.6.3.Final 7.2.2.Final - 8.0.1.Final + 8.0.2.Final 2.4.11.Final 15.0.11.Final 5.0.12.Final From b4c40a9a97624bbbdd90a141607af89748089e8e Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Mon, 16 Dec 2024 17:03:14 +0100 Subject: [PATCH 3/3] [WFLY-20133] Replace usage of the deprecated constraints --- .../integration/beanvalidation/hibernate/validator/Car.java | 4 ++-- .../beanvalidation/hibernate/validator/Employee.java | 2 +- .../beanvalidation/hibernate/validator/UserBean.java | 6 +++--- .../jca/beanvalidation/ra/ValidAdminObjectImpl1.java | 3 +-- .../as/test/integration/jpa/beanvalidation/Player.java | 4 ++-- .../test/integration/jpa/beanvalidation/SoccerPlayer.java | 2 +- .../BeanValidationJPAInheritanceTestCase.java | 2 +- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Car.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Car.java index a9a87e9dcebc..953c658e91fb 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Car.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Car.java @@ -9,9 +9,9 @@ import jakarta.validation.Valid; import jakarta.validation.constraints.AssertTrue; import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; -import org.hibernate.validator.constraints.NotBlank; -import org.hibernate.validator.constraints.NotEmpty; import org.hibernate.validator.group.GroupSequenceProvider; /** diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Employee.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Employee.java index d379eebf4349..c897ccb9309e 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Employee.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/Employee.java @@ -4,7 +4,7 @@ */ package org.jboss.as.test.integration.beanvalidation.hibernate.validator; -import org.hibernate.validator.constraints.Email; +import jakarta.validation.constraints.Email; /** * @author Madhumita Sadhukhan diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/UserBean.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/UserBean.java index 1e940fcafc80..22058afeb0ca 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/UserBean.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/beanvalidation/hibernate/validator/UserBean.java @@ -4,9 +4,9 @@ */ package org.jboss.as.test.integration.beanvalidation.hibernate.validator; -import org.hibernate.validator.constraints.Email; -import org.hibernate.validator.constraints.NotBlank; -import org.hibernate.validator.constraints.NotEmpty; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; /** * @author Madhumita Sadhukhan diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/beanvalidation/ra/ValidAdminObjectImpl1.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/beanvalidation/ra/ValidAdminObjectImpl1.java index 94a2d47464f0..c9cb28e8882c 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/beanvalidation/ra/ValidAdminObjectImpl1.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/beanvalidation/ra/ValidAdminObjectImpl1.java @@ -10,8 +10,7 @@ import jakarta.resource.Referenceable; import jakarta.resource.spi.ResourceAdapter; import jakarta.resource.spi.ResourceAdapterAssociation; - -import org.hibernate.validator.constraints.NotEmpty; +import jakarta.validation.constraints.NotEmpty; /** * Admin object implementation diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/Player.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/Player.java index 32052069dea3..83d05dc411ef 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/Player.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/Player.java @@ -12,11 +12,11 @@ import jakarta.persistence.Inheritance; import jakarta.persistence.InheritanceType; import jakarta.persistence.Table; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; import org.hibernate.envers.Audited; import org.hibernate.envers.NotAudited; -import org.hibernate.validator.constraints.NotBlank; -import org.hibernate.validator.constraints.NotEmpty; /** * @author Madhumita Sadhukhan diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/SoccerPlayer.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/SoccerPlayer.java index a3b28dbf7328..ec1d0ecbb495 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/SoccerPlayer.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/SoccerPlayer.java @@ -7,9 +7,9 @@ import jakarta.persistence.Entity; import jakarta.persistence.PrimaryKeyJoinColumn; import jakarta.persistence.Table; +import jakarta.validation.constraints.NotBlank; import org.hibernate.envers.Audited; -import org.hibernate.validator.constraints.NotBlank; /** * @author Madhumita Sadhukhan diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/beanvalidationinheritancetest/BeanValidationJPAInheritanceTestCase.java b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/beanvalidationinheritancetest/BeanValidationJPAInheritanceTestCase.java index cf6e2b253e5e..c9ad74ce8ac0 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/beanvalidationinheritancetest/BeanValidationJPAInheritanceTestCase.java +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/beanvalidation/beanvalidationinheritancetest/BeanValidationJPAInheritanceTestCase.java @@ -83,7 +83,7 @@ public void testConstraintValidationforJPA() throws NamingException, SQLExceptio String stacktrace = w.toString(); if (Locale.getDefault().getLanguage().equals("en")) { - Assert.assertTrue(stacktrace.contains("interpolatedMessage='may not be empty', propertyPath=lastName, rootBeanClass=class org.jboss.as.test.integration.jpa.beanvalidation.SoccerPlayer")); + Assert.assertTrue(stacktrace.contains("interpolatedMessage='must not be empty', propertyPath=lastName, rootBeanClass=class org.jboss.as.test.integration.jpa.beanvalidation.SoccerPlayer")); } else { Assert.assertTrue(stacktrace.contains("propertyPath=lastName, rootBeanClass=class org.jboss.as.test.integration.jpa.beanvalidation.SoccerPlayer")); }