[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to handle throws declarations with duplicate exceptions



On Thu, 23 Jan 2003, John Plond JORGENSEN wrote:

> My preference is for option 4, since it is the simplest, with 1
> as my second choice. (In the case of option 1, I would also
> change the duplicate exception to IllegalArgumentException, since
> that more accurately reflects the error condition, yet does not
> requiring existing callers of addException() to change their own
> "throws" declaration).

I support option 4.

> The only objection I can imagine to option 4 would be if there is
> some significance to multiple copies of a single exception in an
> Exceptions attribute.  So does anybody know of any such
> significance?

http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#3129

It seems fine to strip duplicate exceptions.

pat