NullPointerException in AbstractEntityGraphVisitationStrategy.startingCollectionIndex

Description

Hi,

I have a complex object graph (closed source code) that leads to a NullPointerException when using a specific EntityGraph. I tried to reproduce with a simple opensource case but I could not.

I think the solution is to add null guard to attributeNode at https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/loader/plan/build/internal/AbstractEntityGraphVisitationStrategy.java#L183 like this:

This solution fixes my issue.

I am creating a PR for this. Alas there will be no test :/

Here is the stacktrace:

Environment

None

Activity

Show:
Réda Housni Alaoui
June 4, 2020, 9:36 AM

The issue is marked as fixed on 5.4.17 but does not seem so. The PR was targeting master. Should I create a PR for branch 5.4?

Andrea Boriero
23 hours ago

Hi ,

the PR has been merged and it will be available in 5.4.23

 

Thanks

Réda Housni Alaoui
21 hours ago

Thank you !

Assignee

Réda Housni Alaoui

Reporter

Réda Housni Alaoui

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

Yes, likely

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Major
Configure