Add getChars to CharSequence (original) (raw)
Martin Buchholz martinrb at google.com
Tue Apr 23 19:55:49 UTC 2013
- Previous message: Add getChars to CharSequence
- Next message: hg: jdk8/tl/jdk: 8005460: [findbugs] Probably returned array should be cloned
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, all-or-nothing behavior on errors is worth something, and we should get it right, especially when it's cheap.
On Tue, Apr 23, 2013 at 4:52 AM, Alan Bateman <Alan.Bateman at oracle.com>wrote:
One other observation, but as the 2-arg getChars doesn't have explicit bounds checking then it may have have copied some chars into the destination array before it throws the AIOOBE. Not too interesting of course but it may be worth considering a check before copying.
-Alan.
- Previous message: Add getChars to CharSequence
- Next message: hg: jdk8/tl/jdk: 8005460: [findbugs] Probably returned array should be cloned
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]