[cp-patches] RFC: add a copy of gnu/java/security/action/GetPropertyAction into sun/security/action

Robert Schuster theBohemian at gmx.net
Wed Jun 4 09:22:18 UTC 2008


Hi.

Andrew Haley schrieb:
>> What is the public equivalent for GetPropertyAction?
> 
> There isn't any need, is there?
That depends. :)

>  It's just a wrapper for
> (String) AccessController.doPrivileged(new PrivilegedAction() {
> 			public java.lang.Object run() {
> 			return System.getProperty(prop); }
> });
That is certainly true but has the nasty side effect of creating an
anonymous class per code location. In the PhoneME code I found ~20
occurrences of GetPropertyAction. Even in Classpath we avoided that by
introducing our own wrapper class.

Regards
Robert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20080604/7b03c637/attachment.pgp 


More information about the Classpath-patches mailing list