JDK 11 RFR of JDK-8196995: java.lang.Character should not state UTF-16 encoding is used for strings

Alan Bateman Alan.Bateman at oracle.com
Thu Feb 8 11:53:33 UTC 2018

On 07/02/2018 22:12, joe darcy wrote:
> Hello,
> Text in java.lang.Character states a UTF-16 character encoding is used 
> for java.lang.String. While was true for many years, it is not 
> necessarily true and not true in practice as of JDK 9 due to the 
> improvements from JEP 254: Compact Strings.
> The statement about the encoding should be corrected.
> Please review the patch below which does this. (I've formatted the 
> patch so that the change is text is made clear; I'll re-flow the 
> paragraph before pushing.
I'm not sure that this is worth changing. You could replace "classes" 
with "API" and add a note to say that an implementation may use an more 
optimization representation but I don't think it's really needed.


More information about the core-libs-dev mailing list