Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
Description
NOTE: This bug report is for JIRA Software Cloud. Using JIRA Software Server? See the corresponding bug report.
The Java ChoiceFormat documentation has an example pattern:
"{0,choice,-1#is negative| 0#is zero or fraction | 1#is one |1.0<is 1+ |2#is two |2<is more than 2.}"
As of AUI 5.3, AJS.format() supports ChoiceFormat, but that example will break with an error of "Cannot read property '1' of null"
There are two different parts that break, due to the format of the regexes inside AJS.format():
- Negative number
- Whitespace surrounding the "|" characters
Attachments
Issue Links
- is related to
-
JSWSERVER-10623 AJS.format doesn't handle negative numbers or extra whitespace in choice format
- Closed