Uploaded image for project: 'BVal'
  1. BVal
  2. BVAL-220

Ensure Java 17/21 compatibility

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1
    • 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)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jungm Markus Jung
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m