Uploaded image for project: 'Hibernate ORM'
  1. HHH-12835

Wrong assertion in BatchFetchQueueHelper

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.2
    • Fix Version/s: 5.3.4, 5.4.0.CR1
    • Component/s: hibernate-core
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      There is an assertion in the removeNotFoundBatchLoadableEntityKeys method of the BatchFetchQueueHelper class that seems to be wrong[1]. This error can make test cases fail unexpectedly.

      When reaching this method having the results list with a size lower than the ids array (Because the ids array has duplicated values: this can happen when using the padding fetch style), then the assertion can fail.

      I think that the ids.length is not the size to check in the assertion. Attached patch with the proposed solution.

      1- BatchFetchQueueHelper Wrong Assertion

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: