XWIKI-8718 and XWIKI-8724: Improved code style