"Aaron M. Renn" wrote:
> 
> I recommend against declaring that a method throws exceptions from
> java.lang.  (Javadoc'ing them is probably good though, but perhaps things
> like NullPointerException are a bit overkill).  If you put them in the
> method decl, then the compiler will force any callers to catch them or
> declare that they throw the method instead of allowing them to propagate
> upward silently as normal.

Ducking completely the issue of whether it's good to declare them or
not...

RuntimeExceptions still do propagate silently upward as normal. I'm not
even sure that they appear anywhere in the bytecode, even if you do
declare them. The behaviour of the code is identical, either way.

Stuart.

Reply via email to