Archie Cobbs wrote:
> Gary Benson wrote:
> > +   try
> > +     {
> > +       Class.forName("java.security.Security");
> > +     }
> > +   catch (Throwable t)
> > +     {
> > +     }
> 
> It might be more appropriate to only catch Exception, not Throwable.

So I was halfway through thinking about this when I forgot and
committed it :(

Why Exception as opposed to Throwable?  My reasoning was that the code
was added to possibly make more things work than do already, and that
anything that might make less things work was to be avoided.

The alternative to Throwable is to catch ClassNotFoundException, which
is the only subclass of Exception that Class.forName throws.

Cheers,
Gary


_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to