[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SecurityManager troubles
From: |
Gary Benson |
Subject: |
Re: SecurityManager troubles |
Date: |
Mon, 16 Jan 2006 10:20:34 +0000 |
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
- Re: SecurityManager troubles, (continued)
RE: SecurityManager troubles, Jeroen Frijters, 2006/01/13
RE: SecurityManager troubles, Jeroen Frijters, 2006/01/13
RE: SecurityManager troubles, Jeroen Frijters, 2006/01/14
RE: SecurityManager troubles, Jeroen Frijters, 2006/01/16