Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
-
None
Description
Some small tweaks are required to actually build BVal on Java 17/21, but more importantly Meta#equals/Meta#hashCode does not work anymore properly on Java 17 and generates the same hashCode for different Meta objects, breaking Liskov#detectValidationElements (therefore breaking tests in the TCK testsuite)
Java 11:
Meta host is: sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl@6b2e46af (meta hashCode: 1798194894) Meta host is: sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl@60325987 (meta hashCode: 1613912486) Meta host is: sun.reflect.annotation.AnnotatedTypeFactory$AnnotatedTypeBaseImpl@5e1d03d7 (meta hashCode: 1578959862)
Java 17:
Meta host is: org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.model.User (meta hashCode: 1156135968) Meta host is: org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.model.User (meta hashCode: 1156135968) Meta host is: @jakarta.validation.Valid() @jakarta.validation.groups.ConvertGroup(from=jakarta.validation.groups.Default.class, to=org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.model.BasicPostal.class) org.hibernate.beanvalidation.tck.tests.constraints.groups.groupconversion.model.User (meta hashCode: -679987029)