>>>>> "David" == David Daney <[EMAIL PROTECTED]> writes:

David> The documentation (jdk 1.4.2) of Class.newInstance() says that
David> InstantiationException is thrown if "... if the instantiation fails
David> for some other reason."  In my book throwing an exception falls under
David> the catagory of "some other reason"

Read the 1.5 docs.  They are explicit about passing through checked
exceptions here.  Though the docs still manage to be internally
inconsistent; it looks like someone forgot to update an @throws.

There's no question that this is a historical error.  It does violate
the JLS, which is bad, and is dumb in other ways too.

But Sun's options for fixing this were pretty limited.  Sometimes it
really does make sense to just document a mistake and move on.

Tom

Reply via email to