On Sat, Mar 20, 2010 at 14:52, Ulf Zibis<ulf.zi...@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