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:

Activity

Show:

Réda Housni Alaoui October 21, 2020 at 12:28 PM

Thank you !

Andrea Boriero October 21, 2020 at 10:36 AM

Hi ,

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

 

Thanks

Réda Housni Alaoui June 4, 2020 at 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?

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created April 24, 2020 at 2:45 PM
Updated April 19, 2021 at 10:54 AM
Resolved April 19, 2021 at 10:54 AM