review request for 6798511/6860431: Include functionality of Surrogate in Character
Ulf Zibis
Ulf.Zibis at gmx.de
Sun Mar 21 12:00:00 UTC 2010
>
> On Sat, Mar 20, 2010 at 14:52, Ulf Zibis<Ulf.Zibis at gmx.de> wrote:
>
>> - A little "bug" in javadoc:
>> @exception ArrayIndexOutOfBoundsException
>> instead IndexOutOfBoundsException
>>
> Not a bug.
>
Yes, but decreases the users capabilities catching exceptions more
precise and flexible.
Imagine, a method would throw an IndexOutOfBoundsException for some
reason and too calls Character.toChars(). The caller of such a method
could distinguish, where the exception would come from, and have
separate catch blocks. But if not documented ... :-(
In extreme, following too would not be a bug in your sense:
@exception Exception
I became sensitive on this, as I have seen real bugs in
AbstractStringBuilder vice versa, where methods actually throw
IndexOutOfBoundsExceptions, but their javadoc states StringIndexOutOf
BoundsException.
Would be a nice game for easter, inviting people to search for those
bugs in JDK code base, than for coloured eggs.
> You do realize AIOOBE is a subclass of IOOBE?
>
Yes.
-Ulf
More information about the core-libs-dev
mailing list