[xwiki/xwiki-platform] 3aa193: [Misc] Simplify the event dispatch of the XWiki ev...
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 3aa19316223749551da21b91b11a4683a1a6be5e https://github.com/xwiki/xwiki-platform/commit/3aa19316223749551da21b91b11a4... Author: Vincent Massol <[email protected]> Date: 2026-09-21 (Mon, 21 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java A xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/XWikiEventListenerTest.java Log Message: ----------- [Misc] Simplify the event dispatch of the XWiki event listener (#6468) * The switch introduced when the if/else chain of `XWiki#onEvent` was converted kept the XObject property handling inside its default branch. That branch therefore performed a second `instanceof` on the value the switch had just dispatched on, and cast the event source to an `XWikiDocument` for every event that matched none of the other cases. * Turn it into a `case XObjectPropertyEvent` delegating to a named method, so the cast happens on the branch that established the type, and leave a default whose empty block carries the reason it is empty. * Add the missing tests: neither the invalidation of the backlinks cache nor the list of events the listener registers was covered. Co-authored-by: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications