Both of these classes state that for the prefix and suffix of a String pattern, any Unicode character is allowed, except U+FFFE, U+FFFF, and the special symbols.
This does not appear to be true, as the implementation makes no check for these characters, and you can create an instance of both classes with the mentioned characters serving as the prefix/suffix.
Although not a big deal and it has been there for quite some time now, the claim should probably be removed if it is incorrect. See comments for code example.
This does not appear to be true, as the implementation makes no check for these characters, and you can create an instance of both classes with the mentioned characters serving as the prefix/suffix.
Although not a big deal and it has been there for quite some time now, the claim should probably be removed if it is incorrect. See comments for code example.
- csr for
-
JDK-8315964 DecimalFormat and CompactNumberFormat do allow U+FFFE and U+FFFF in the pattern
- Closed