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

Andrew Azores aazores at redhat.com
Thu Mar 13 13:58:54 UTC 2014

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.


Andrew A

-------------- next part --------------
A non-text attachment was scrubbed...
Name: policyeditor-filechanged-npe-2.patch
Type: text/x-patch
Size: 1307 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140313/e2b5424b/policyeditor-filechanged-npe-2.patch>

More information about the distro-pkg-dev mailing list