river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <j...@zeus.net.au>
Subject Re: Permission - immutability wild card SocketPermission
Date Wed, 21 Dec 2011 05:25:20 GMT
I registered this in the sun bug database, the bug ID: 7123126, it could be a couple of days
before it shows up.


----- Original message -----
> The javadoc for Permission states implementations should be immutable like
> String, this is the design basis for DynamicPermissionCollection.
> SocketPermission is not entirely immutable and it's fields not synchronised nor
> volatile.  Only wild card SocketPermissions are effectively immutable.
> Rather than continue to try and work around it, I'll file a java bug report.
> The most likely outcome is fields used for caching dns lookup and failure will
> be stale, causing unnecessary repeated dns lookup.
> To avoid dns the best solution will be to use wildcard SocketPermission's.
> The standard jvm policy can be avoided by using == instead of = when specifying
> policy file locations.
> I can implement a Comparator to ensure the check order of SocketPermission
> preferences wildcards.
> Are most developers happy to rely on wild card SocketPermission's?
> Regards,
> Peter.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message