Skip to content

NullPointerException appears in PersistentPropertyPathExtension#equals #1164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
olexandrkucher opened this issue Feb 10, 2022 · 2 comments
Closed
Labels
type: regression A regression from a previous release

Comments

@olexandrkucher
Copy link
Contributor

NullPointerException appears in PersistentPropertyPathExtension#equals, because field PersistentPropertyPathExtension#path is nullable and equals ignores that path can be null:

public boolean equals(Object o) {
    //...
    return entity.equals(that.entity) && path.equals(that.path);
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 10, 2022
@schauder
Copy link
Contributor

Do you have an actual scenario where this happens?

@schauder schauder added the status: waiting-for-feedback We need additional information before we can continue label Feb 11, 2022
schauder added a commit that referenced this issue Feb 11, 2022
Adding references to issues on test annotations.
Made test methods package private.

See #1164
@olexandrkucher
Copy link
Contributor Author

We have a custom DataAccessStrategy that speeds up the read operation for a list of data. As one of the steps, we are grouping all PersistentPropertyPathExtension by the parent path.
This logic worked properly in spring-data-relational v2.0.1.RELEASE and failed after upgrade to the latest version

@schauder schauder added type: regression A regression from a previous release and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Feb 14, 2022
schauder added a commit that referenced this issue Feb 15, 2022
Adding references to issues on test annotations.
Made test methods package private.

See #1164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants