Branch: refs/heads/claude/clever-feynman-bvqqrl-s9354-resource Home: https://github.com/xwiki/xwiki-platform Commit: 5ca9fdae78e57d8c4477bd39a888b69cb1a04d21 https://github.com/xwiki/xwiki-platform/commit/5ca9fdae78e57d8c4477bd39a888b... Author: Vincent Massol <[email protected]> Date: 2026-08-29 (Sat, 29 Aug 2026) Changed paths: M xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-api/src/main/java/org/xwiki/resource/AbstractResourceReferenceHandler.java M xwiki-platform-core/xwiki-platform-resource/xwiki-platform-resource-api/src/test/java/org/xwiki/resource/ResourceReferenceHandlerTest.java Log Message: ----------- [Misc] Fix a SonarQube issue: an overflow-prone compareTo whose test asserts its magnitude * java:S9354: AbstractResourceReferenceHandler#compareTo used getPriority() - other.getPriority(); int subtraction wraps on overflow and can then return the wrong sign. Replaced with Integer.compare(). * ResourceReferenceHandlerTest#priority asserted the exact difference (300) rather than its sign, which is not part of the Comparable contract; adapted to assert the sign. Co-Authored-By: Vincent Massol <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications