[rfc][icedtea-web][policyeditor] CustomPermissions toString correction for basic permissions

Lukasz Dracz ldracz at redhat.com
Fri Jun 6 16:05:19 UTC 2014



----- Original Message -----
> From: "Andrew Azores" <aazores at redhat.com>
> To: "IcedTea" <distro-pkg-dev at openjdk.java.net>
> Sent: Friday, June 6, 2014 11:39:10 AM
> Subject: [rfc][icedtea-web][policyeditor] CustomPermissions toString correction	for basic permissions
> 
> Hi,
> 
> There are two major types of permissions that go into policy files -
> standard permissions, and basic permissions. Standard permissions have
> the following format:
> 
> permission $permission_type "$permission_target",
> "$permission_action1,$permission_action2";
> 
> Basic permissions have the following format:
> 
> permission $permission_type "$permission_target";
> 
> Without this patch, the CustomPermission class erroneously formats its
> basic permissions to include an empty actions string. So, in the case of:
> 
> permission java.lang.RuntimePermission "createClassLoader";
> 
> Instead, it would be presented as:
> 
> permission java.lang.RuntimePermission "createClassLoader", "";
> 
> This patch very simply fixes this bug (which was due to comparing a
> string to an enum member containing a string field, rather than
> comparing a string to the string field *contained* by the enum member)
> and adds a unit test for this case.
> 
> Thanks,
> 
> --
> Andrew A
> 
> 

Hello,

Looks good, as to the 1.5 backport, I don't know if I can approve backports but if I can then I agree this would be worthwhile to backport to 1.5.

Thank you,
Lukasz Dracz



More information about the distro-pkg-dev mailing list