RFR: 8012665: CharSequence.chars, CharSequence.codePoints (original) (raw)
Henry Jen henry.jen at oracle.com
Thu Apr 25 20:25:25 UTC 2013
- Previous message: hg: jdk8/tl/jdk: 8000529: Regression: SimpleDateFormat incorrectly parses dates formatted with Z and z pattern letters
- Next message: RFR: 8012665: CharSequence.chars, CharSequence.codePoints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Please review two default methods add to CharSequence returns IntStream of char value or code point value.
http://cr.openjdk.java.net/~henryjen/tl/8012665.0/webrev/
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.
Cheers, Henry
- Previous message: hg: jdk8/tl/jdk: 8000529: Regression: SimpleDateFormat incorrectly parses dates formatted with Z and z pattern letters
- Next message: RFR: 8012665: CharSequence.chars, CharSequence.codePoints
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]