Affects Version/s: 8.6.1
Fix Version/s: 8.6.2
Security Level: Jimmy
reproduced with openJDK 11 (https://jdk.java.net/11/)
AdoptOpenJDK 11.0.2 (https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot)
gh.sprint.customfield.default.name:ZK 8.6.2 S1, ZK 8.6.2 S2
Try typing a minus character into the int boxes.
For the intbox with swedish locale the MINUS key (numpad and normal keyboard) is ignored
Possible to type negative numbers
Allow using the minus key on a keyboard to type in negative numbers.
Looking closely at the swedish Intbox you'll see the MINUS character is not a HYPHEN-MINUS (code 0x2d) but a unicode MINUS (code \u2212)
Since JDK 9 the default locale DB was changed to CLDR (http://openjdk.java.net/jeps/252).
Which defines the unicode MINUS as the minusSign for various locales (including swedish)
(most locales still use the HYPHEN-MINUS code 0x2d)
- https://bugs.openjdk.java.net/browse/JDK-8214926 mentions a possibility to change the default locale provider to be compatible with JDK8 by specifying a JVM startup argument:
- alternative in ZK: In order to allow both characters override the getAllowedKeys_ function for NumberInputWidgets
This happens to work, as the number parser will replace the localized MINUS character with a HYPHEN-MINUS anyway, so that allowing to type it doesn't change the parsed result.