Hey guys, thanks for responding.
Forgive me for using the work "clone" (however, it really should be a clone in my mind, the base class should have implemented Cloneable in addition to Serializable).
Essentially the PermissionInfoCollection.addPermissions method attempts to create a "copy" of the permission for the purpose adding to it's collection.
However, there is nowhere in the spec that states a permission impl must have either a 0, 1 or 2 String constructor.
The only requirements are:
- they extend from the base Permission class
- thereby should be Serializable
- they be immutable.
So, the "reconstitution" if you will, using the 0, 1 or 2 String constructor is really just working on assumption and accidentally works because all of the implementations in standard java are just that simple.
I'm proposing a different "copy" mechanism that will work for any implementation based on the assumption that they respect Serializable as they must. I'm not quite sure what that looks like yet, but I have a few ideas.
However, before going that far, I'm trying to see if I can make a change in our code to avoid the need the change the equinox impl... but i'm struggling with this.
Sincerely,
- Ray