RFR: 8012665: CharSequence.chars, CharSequence.codePoints

Henry Jen henry.jen at oracle.com
Thu Apr 25 13:25:25 PDT 2013


Please review two default methods add to CharSequence returns IntStream
of char value or code point value.


The synchronization test is relieved so lambda and other synthetic
method is not tested. If synchronization is needed for those two default
methods, subclass should override the methods.

With charAt and codePointAt properly synchronized, the default
implementation is sufficient. However as noted, if the sequence is
mutated while the stream is being read, the result is undefined.


More information about the lambda-dev mailing list