[fyi] [icedtea-web]failing unittest testSetFileNull

Jie Kang jkang at redhat.com
Wed Sep 10 17:55:11 UTC 2014



----- Original Message -----
> ----- Original Message -----
> > Hello,
> > 
> > > FAILED:
> > > testSetFileNull(net.sourceforge.jnlp.security.policyeditor.PolicyFileModelTest)
> > > Expected
> > > exception: java.lang.NullPointerException
> > > 
> > > 
> > > Is now appearing. I think thatthis was actually fixed in sources, but
> > > obviously the test was not
> > > adapted. Can responsible person fix?
> > 
> > I added a check for if it is null then throw a Null Pointer Exception.
> > 
> > Okay to push ?
> 
> No. The null value was made acceptable and the test was not updated in
> response to the change.
> 
> Please check code usages, etc. before changing functionality.

Also please run basic tests when you make changes. If you recompile and run policyeditor with this patch it immediately fails to open with an NPE. This is a good sign that the change needs more work.

> 
> PolicyFileModel::setFile -> PolicyEditorController::setFile : there are calls
> with setFile(null) that are accepted. This is for the case of a new file
> with no filepath.
> 
> 
> The test can probably be removed.
> 
> 
> Regards,
> 
> > 
> > Thank you,
> > Lukasz Dracz
> > 
> > 
> 
> --
> 
> Jie Kang
> 

-- 

Jie Kang


More information about the distro-pkg-dev mailing list