[xwiki/xwiki-platform] 3b4f8c: [Misc] Replace the try/catch of MonitorTimer#toStr...
Branch: refs/heads/claude/clever-feynman-6a1n0j Home: https://github.com/xwiki/xwiki-platform Commit: 3b4f8c859d134cf3543d68aa424d5af0b82ebe4d https://github.com/xwiki/xwiki-platform/commit/3b4f8c859d134cf3543d68aa424d5... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/monitor/api/MonitorTimer.java Log Message: ----------- [Misc] Replace the try/catch of MonitorTimer#toString() with a null check * Following review: the catch was only there to swallow the NPE thrown when the duration of a timer that has not ended yet is printed, so a null check on the two dates says it directly and removes the empty block. * Behaviour is unchanged: the "Duration: " label was already appended before the throwing expression, so a running timer printed the label with no value before and still does. Co-Authored-By: Vincent Massol <[email protected]> Commit: 1cef9b6735dec9245fb7af16685d12c169cb9d3e https://github.com/xwiki/xwiki-platform/commit/1cef9b6735dec9245fb7af16685d1... Author: Vincent Massol <[email protected]> Date: 2026-08-25 (Tue, 25 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-feed/xwiki-platform-feed-api/src/main/java/com/xpn/xwiki/plugin/feed/FeedPlugin.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/XWikiRightServiceImpl.java Log Message: ----------- [Misc] Drop the TODOs where catching the exception is the valid design * Following review: XWikiRightNotFoundException is a domain signal meaning "no right defined at this level", so catching it to continue with the next check is valid and the 12 TODOs asking to change that logic are removed; the comment saying what the catch means stays. * FeedPlugin's TODO is reworded: falling back when the Map constructor is missing is fine, but catching Throwable there also hides a failure of the constructor that was found, so the ask is to log a warning. Co-Authored-By: Vincent Massol <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/9e3be4c2f387...1cef9b6735de To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications