river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter <j...@zeus.net.au>
Subject Permission - immutability wild card SocketPermission
Date Tue, 20 Dec 2011 04:36:13 GMT
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.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message