Skip to content

Commit

Permalink
[WFLY-20133] Replace usage of the deprecated constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Dec 17, 2024
1 parent 860944d commit b4c40a9
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down

0 comments on commit b4c40a9

Please sign in to comment.