docs: fix UserPreDeleteEvent accessors in README - #360
Conversation
|
Reviewed. This is a small, accurate doc fix — verified against
No issues found. LGTM. |
There was a problem hiding this comment.
Pull request overview
Updates the library’s README documentation so consuming applications can correctly handle UserPreDeleteEvent as it exists since 5.0.0 (carrying scalar userId/userEmail rather than a User entity), ensuring the provided listener example matches the actual public API.
Changes:
- Corrected the
UserPreDeleteEventdescription to reflect that it exposesgetUserId()andgetUserEmail()(and does not carry aUserentity). - Updated the README’s listener example to use
event.getUserId()instead ofevent.getUser().getId().
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The README described
UserPreDeleteEventas carrying theUserentity viaevent.getUser()(line 968) and usedevent.getUser().getId()in the listener example (line 998). Since 5.0.0 the event exposes onlygetUserId()andgetUserEmail()(UserPreDeleteEvent.java:52,61); the example did not compile as written. Updated the description and the example to match the class and the demo app's actualUserProfileDeletionListener. Found while rewriting the demo app's docs (devondragon/SpringUserFrameworkDemoApp#85).