NullPointerException when executing native query on an Audited Entity

Description

Native queries stopped working after upgrade to v5.3.2.

AbstractSharedSessionContract: Line 958 : Null check for javaType required in the newly added condition.

Test case attached.

Exception:
java.lang.NullPointerException
at org.hibernate.internal.AbstractSharedSessionContract.lambda$handleNativeQueryResult$1(AbstractSharedSessionContract.java:958)
at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
at java.base/java.util.HashMap$KeySpliterator.tryAdvance(HashMap.java:1629)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:528)
at org.hibernate.internal.AbstractSharedSessionContract.handleNativeQueryResult(AbstractSharedSessionContract.java:958)
at org.hibernate.internal.AbstractSharedSessionContract.createNativeQuery(AbstractSharedSessionContract.java:928)
at org.hibernate.internal.AbstractSessionImpl.createNativeQuery(AbstractSessionImpl.java:23)
at org.hibernate.bugs.JPAUnitTestCase.handleNativeQueryResult(JPAUnitTestCase.java:38)

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Joaquim Mascarenhas

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.3.1

Components

Affects versions

Priority

Blocker
Configure