Update Hibernate's custom IdentityMap to better match its use

Description

Some of the design choices in IdentityMap are showing some age, and we can benefit from a lambda to save quite a bit of allocations.

Environment

None

Status

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Minor
Configure