Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Dan Creswell
What kind of thoughts are you after? Appropriateness, code review, something else? On 19 December 2011 05:59, Peter Firmstone wrote: > Thoughts? > > > /* > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements.  See the NOTICE file > * distribute

Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Peter Firmstone
Anyone notice a problem yet? Even though a Permission probably could and should be immutable, there's an issue, some aren't. Going back to our favourite bad example of a Permission implementation, SocketPermission: SocketPermission mutates on implies calls. Now, most of the state required

An amusing test failure

2011-12-19 Thread Peter Firmstone
Hmmm... At least URI based grant's won't suffer from the same problem, to resolve this URL, requires a network connection, unfortunately the policy just gets stuck in a an endless loop asking itself... Ha ha. [java] at java.net.URL.equals(URL.java:842) [java] at java.security.

Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Peter Firmstone
Dan Creswell wrote: What kind of thoughts are you after? Appropriateness, code review, something else? Ideas. It would be nice to lock on each SocketPermission, however that isn't possible, it cannot be wrapped inside SocketPermissionCollection and the latter cannot be guaranteed to be u

Build failed in Jenkins: River-trunk-QA-windows #1

2011-12-19 Thread Apache Jenkins Server
See -- [...truncated 7873 lines...] [exec] Certificate stored in file <> are-passwords-available:

Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Gregg Wonderly
On 12/18/2011 11:59 PM, Peter Firmstone wrote: @Override public boolean implies(Permission permission) { if ( ! cl.isInstance(permission)) return false; Permission [] p = perms.toArray(new Permission[0]); //perms.size() may change I not sure why you are using an empty Permi

Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Peter Firmstone
Gregg Wonderly wrote: On 12/18/2011 11:59 PM, Peter Firmstone wrote: @Override public boolean implies(Permission permission) { if ( ! cl.isInstance(permission)) return false; Permission [] p = perms.toArray(new Permission[0]); //perms.size() may change I not sure why you a

Re: A non blocking (almost) DynamicPermissionCollection

2011-12-19 Thread Gregg Wonderly
On 12/19/2011 1:14 PM, Peter Firmstone wrote: Gregg Wonderly wrote: On 12/18/2011 11:59 PM, Peter Firmstone wrote: @Override public boolean implies(Permission permission) { if ( ! cl.isInstance(permission)) return false; Permission [] p = perms.toArray(new Permission[0]); //

Permission - immutability wild card SocketPermission

2011-12-19 Thread Peter
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. Rat