Branch: refs/heads/XWIKI-18971
Home:
https://github.com/xwiki/xwiki-platform
Commit: 4acd7c3588860a3e45b77f40899a1fd05bcfe338
https://github.com/xwiki/xwiki-platform/commit/4acd7c3588860a3e45b77f40899a…
Author: Simon Urli <simon.urli(a)xwiki.com>
Date: 2023-12-07 (Thu, 07 Dec 2023)
Changed paths:
M
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/NumberClass.java
M
xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/objects/classes/NumberClassTest.java
Log Message:
-----------
XWIKI-18971: Number property input does not take into account the current locale to
parse floating numbers
Use a NumberFormat instance based on the locale of the owner document
for parsing number values.
I also simplified a bit the code of NumberClass#fromString, started
refactoring of NumberClassTest, but it's still missing lots of test
cases.
Also it's still a WIP: right now we've several unit tests failing in
oldcore because of this: probably because the owner document is now
mandatory for this method. We might need a fallback in case no owner
document is specified.