N.B.: In branch 5.6 the same trivial improvement/replacement could be done, it’s only located in anther place: StatefulPersistenceContext.java line 2001