NPE on flushing when ElementCollection field contains null element

Description

This issue is caused by the performance improvement done on 5.4.4 (and backported on 5.3.11).

the symptom is a NPE when flushing a persisted entity containing a ElementCollection with null as one of the elements in the list.

a test case has been attached

The NPE is also thrown when an automatic flush is triggered (when for example we call getResultList() on a native query).

upgrading to the latest 5.4.6 doesn't fix the issue not downgrading to 5.3.12 but downgrade to 5.4.3 fix the issue...
reverting

Environment

None

Status

Assignee

Unassigned

Reporter

Yosef Yona

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.3

Components

Affects versions

5.4.6
5.4.5
5.3.12
5.3.11
5.4.4

Priority

Blocker
Configure