Thoughts?
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version
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
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
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
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
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
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]); //
Hmm,
You're right, the code is more readable with a cast ;)
A side effect of Generics being bolted on, hope they fix it some day.
Peter.
- Original message -
> On 12/19/2011 1:14 PM, Peter Firmstone wrote:
> > Gregg Wonderly wrote:
> > > On 12/18/2011 11:59 PM, Peter Firmstone wrote:
>