Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread BJ Hargrave
Can you please provide more detail on the issue? What do you mean by cloning? -- BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance hargr...@us.ibm.com office: +1 386 848 1781 mobile: +1 386 848 3788 From: Raymond Auge raymond.a...@liferay.com To:

Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread BJ Hargrave
I think it is pretty clear that permission classes must have a public constructor that is either empty or takes one or two strings. This is effectively required by the Java policy file grant format: grant { permission java.io.FilePermission C:\\users\\cathy\\foo.bat, read; }; and by

Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread BJ Hargrave
Essentially the PermissionInfoCollection.addPermissions method attempts to create a copy of the permission for the purpose adding to it's collection. Also, to be clear, there is no copying going on here. The code needs to construct a Permission object from the information in the

Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread Raymond Auge
Ok, I stand corrected. After looking at the code for PolicyParser it seems the 0, 1, 2 rule is indeed the case. Other documentation seems to have implied that an arbitrary number of constructor arguments were acceptable:

Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread Raymond Auge
PS: We were not loading our permissions from a standard policy file. Hence how we ended up with what we have. On Thu, Apr 18, 2013 at 12:26 PM, Raymond Auge raymond.a...@liferay.comwrote: Ok, I stand corrected. After looking at the code for PolicyParser it seems the 0, 1, 2 rule is indeed the

Re: [equinox-dev] PermissionInfoCollection issues with perms cloning

2013-04-18 Thread BJ Hargrave
Then you probably have your own way to populate your PermissionCollections. However in Equinox which supports the OSGi permission specifications, the way to populate the PermissionCollections is via PermissionInfos which require the 0,1,2 constructors. If you have special permissions that