# 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:

None

## Activity

Show:
Chris Cranford
October 4, 2019, 11:29 PM

, thanks for finding this. I have pushed a fix for this to master and it will be part of the 5.4.7 release. Should you need a fix sooner, you can either integrate the changes from https://github.com/hibernate/hibernate-orm/commit/d95c16e9ab1b3d3b718adb4eb0fa0ede62b9cd95 and build Envers yourself or use the hibernate-envers-5.4.7-SNAPSHOT.jar once its been updated in the meantime.

Chris Cranford

## Reporter

Manuel Dominguez Sarmiento

None

None

None

None

None

None

5.4.5

Critical
Configure