[rfc][icedtea-web][policyeditor] NPE in filechanged check

Jiri Vanek jvanek at redhat.com
Thu Mar 13 15:46:17 UTC 2014


Ok. then.

J.
On 03/13/2014 02:58 PM, Andrew Azores wrote:
> On 03/13/2014 03:11 AM, Jiri Vanek wrote:
>> On 03/12/2014 04:36 PM, Andrew Azores wrote:
>>> Hi,
>>>
>>> Just noticed that there are conditions where an NPE will occur due to the new filechanged check.
>>> Steps to reproduce:
>>> 1) launch policyeditor with no arguments
>>> 2) create some set of permissions, eg Print Documents only, doesn't really matter so long as you
>>> make at least one change
>>> 3) press Apply
>>> 4) attempt to save the policy file to any location eg $HOME/test.policy
>>> 5) NPE will occur because there is no MD5SumWatcher reference, since no policy file was ever opened
>>> first
>>> 5b) file fails to save
>>>
>>> With the patch applied, 5/5b does not occur, and instead the flow completes as expected with a
>>> "Changes saved" message, and the file can be verified as written to disk.
>>>
>>> Thanks,
>>
>> I'm missing the creation of fileWatcher  *after* the file is saved now.
>>
>>
>> J.
>>
>
> Thanks for catching that.
>
> Thanks,
>



More information about the distro-pkg-dev mailing list