[rfc][icedtea-web][policyeditor] Parsing enhancements and unit tests

Jiri Vanek jvanek at redhat.com
Mon Mar 10 15:50:01 UTC 2014


On 03/10/2014 04:03 PM, Andrew Azores wrote:
> On 03/10/2014 08:25 AM, Jiri Vanek wrote:
>> On 03/08/2014 05:07 AM, Andrew Azores wrote:
>>> Well, I guess I could make one matcher, check if it matches, and then if not, make the other and check with it, but how much does it really matter... ? I think the intention is clearer, having the conjunction in the first if check. I doubt it will make much of a perfomance difference for most users,
>> > unless they end up with much more massive custom policy files than I'm expecting.
>>
>> Well its not about the performance of this method, but about ITW as a whole. Consider such a redundant calls in each method. They will mutliply runtime later unbearable.
>
> Bordering on premature optimization here IMO, but I made the change anyway.
>

ZZZZ :)) I would write it still much differently, but nvm. Even ^ was nitpicking. Sorry.
ok for head.


>>>
>>> And of course the CustomPermission and PolicyEditorPermissions fromString() methods are "suspiciously" similar
>>
>> Then why they dont share an code?
>>
>> > - they are both reading from the same source and attempting to parse into more or less the same end result. Why would they be really different? I guess the logic is mostly the same so they could be given a parent class or some utility method.
>>
>> Please eleaborate on this two hunks a bit.
>
> PolicyEditorPermissions now uses CustomPermission as an intermediate form, which is a little funny sounding, but CustomPermission is really just a holder for the three attributes a permission entry has, and PolicyEditorPermissions just enumerates specific combinations that are presented as checkboxes in the GUI. So it actually does make sense. From this perspective, CustomPermission's name might make more sense as something like BasicPermission, but from the perspective of the PolicyEditor itself, CustomPermission is a more informative name, so I'd rather keep the name as-is.
>
>>
>>>
>>> Thanks,
>>>
>>> Andrew A
>>>
>>> ----- Original Message -----
>>> From: "Jiri Vanek"<jvanek at redhat.com>
>>> To: "Andrew Azores"<aazores at redhat.com>
>>> Cc: "IcedTea"<distro-pkg-dev at openjdk.java.net>
>>> Sent: Friday, March 7, 2014 8:24:09 AM
>>> Subject: Re: [rfc][icedtea-web][policyeditor] Parsing enhancements and unit tests
>>>
>>> The messages.properties changes are still not listed in changelog.
>> and dont forget^ O:)
>
> Yes, remembered this time :)
>
> Thanks,
>



More information about the distro-pkg-dev mailing list