[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: System.getProperty & SecurityManager
From: |
Michael Koch |
Subject: |
Re: System.getProperty & SecurityManager |
Date: |
Fri, 16 Apr 2004 10:27:04 +0200 |
User-agent: |
KMail/1.5.4 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Donnerstag, 15. April 2004 20:10 schrieb Tom Tromey:
> >>>>> "Ewout" == Ewout Prangsma <address@hidden> writes:
>
> Ewout> I've noticed lots of System.getProperty calls in classpath.
> Ewout> These calls can throw security exceptions when a security
> Ewout> manager is active.
>
> Ewout> To avoid this wrap the getProperty call in a
> Ewout> PrivilegedAction. I've written some helper classes to avoid
> Ewout> retyping that every time. I'm happy to send them.
>
> Ewout> PS. The security manager also causes other issues, but
> Ewout> getProperty is most frequent.
>
> The security manager code hasn't been used very much. It's great
> that you're trying this out. We're definitely interested in
> patches to wrap these calls. In some cases it would also be good
> to just cache the result...
Caching can be dangerous because the SecurityManager may decide
differently depending on who called a method, or the SecurityManager
may hav changed totally ... This has to be carefully thought out.
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAf5jYWSOgCCdjSDsRAnxgAJ4wL3zqKzOTe5uW4HI2CSBalH752ACglJMZ
VMoEhm1iAp8tShl1WAKM05k=
=8hSM
-----END PGP SIGNATURE-----