You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which essentially defaults to a pattern h:mm:ss a however the whitespace before the a has somehow become a NNBSP \u202f instead of a plain vanilla space \u0020. This means that the enduser has to literally type and submit the NNBSP character in order to get it to convert successfully. This makes no sense. I'm not terribly sure if the bug is in JDK or in Faces/Mojarra. But this is definitely something to look at. There should be a way to extract the pattern from the formatter and then replace all spurious whitespace by a normal space and then recreate the formatter based on pattern instead of FormatStyle as that appears to be intended as output-only somehow.
The text was updated successfully, but these errors were encountered:
On second thought, I believe defaulting to an arbitrary FormatStyle for parsing was a bad idea from the beginning on because this is locale specific nonetheless. The pattern of <f:convertDateTime type="..."> should in case of converting a string to java.time type have defaulted to an ISO format, as defined in among others LocalTime#parse(String) (so the parse() method without formatter argument).
We should probably revise the spec on this for 5.0.
On the other hand it's also possible that the original test was bad, that it shouldn't have relied on a locale/JDK specific output pattern, but that it should have used a predefined parsing pattern. The goal of these tests was nonetheless whether the input is conversible to a java.time type in bean.
// between JDK8 and 11 some space characters became non breaking space '\u00A0'if (formatter.getPositivePrefix().indexOf(Constants.NON_BREAKING_SPACE) >= 0) {
value = value.replaceAll(Constants.SPACE, Constants.NON_BREAKING_SPACE_STR);
}
Discovered in TCK jakartaee/faces#1882
The following doesn't anymore work for me with OpenJDK 21.0.1:
Assuming
en_US
locale, and nopattern
specified, this creates under the covers a default formatter as follows:which essentially defaults to a pattern
h:mm:ss a
however the whitespace before thea
has somehow become a NNBSP\u202f
instead of a plain vanilla space\u0020
. This means that the enduser has to literally type and submit the NNBSP character in order to get it to convert successfully. This makes no sense. I'm not terribly sure if the bug is in JDK or in Faces/Mojarra. But this is definitely something to look at. There should be a way to extract the pattern from the formatter and then replace all spurious whitespace by a normal space and then recreate the formatter based onpattern
instead ofFormatStyle
as that appears to be intended as output-only somehow.The text was updated successfully, but these errors were encountered: