NullPointerException after persisting null NaturalId-values in combination with @NaturalIdCache

Description

Since Steve has fixed (see org.hibernate.test.naturalid.nullable.NullableNaturalIdTest),
there's no NullPointerException anymore when persisting null values.
But a NullPointerException raises again when annotating the entity class with @NaturalIdCache.

Cause:

NaturalIdCacheKey.java constructor

Proposed fix:

NaturalIdCacheKey.java constructor

Testcase (see attachement):

org.hibernate.test.annotations.naturalid.NaturalIdOnSingleManyToOneTest.java

Environment

None

Status

Assignee

Unassigned

Reporter

Guenther Demetz

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Minor
Configure