Code review request for checked/unchecked exception clarifications
Joe Darcy
Joe.Darcy at Sun.COM
Fri Jan 8 03:36:54 UTC 2010
David Holmes - Sun Microsystems wrote:
> Hi Joe,
>
> This looks fine to me.
>
> One minor consistency nit, sometimes you refer to "subclasses of" and
> sometimes "subclass of" eg:
>
> + * <p>The class {@code Exception} and any subclasses that are not also
> + * subclasses of {@link RuntimeException} are <em>checked
> + * exceptions</em>.
>
> + * For the purposes of compile-time checking of exceptions, {@code
> + * Throwable} and any subclass of {@code Throwable} that is not also a
> + * subclass of either {@link RuntimeException} or {@link Error} are
> + * regarded as checked exceptions.
>
> For consistency you could use the same wording for Exception as you do
> for Throwable.
Hi David.
That difference you spotted was intentional in this case. The
"subclasses" wording is closer to the wording in JLSv3 section 11, but I
thought "subclass" was clearer to state the "RuntimeException or Error"
constraint
Thanks for the review,
-Joe
More information about the core-libs-dev
mailing list