Envers Map<Enum, Integer> causes NullPointerException when mapped with @MapKeyEnumerated since Hibernate 5.4.6

Description

It seems fixed Map<Enum, Entity> mappings which use @MapKeyEnumerated, but in the process this inadvertedly broke Map<Enum, ?> mappings for which "?" is anything else instead of an entity.

This is the stacktrace we get since upgrading to 5.4.6:

This is an example mapping that breaks because of this:

Environment

None

Assignee

Chris Cranford

Reporter

Manuel Dominguez Sarmiento

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.5

Components

Affects versions

Priority

Critical
Configure