On Tue, 2015-08-04 at 21:42 -0400, Steve Dougherty wrote:
> On 08/03/2015 08:11 AM, Steve Dougherty wrote:
> > Hi everyone / Charles,
> > 
> > We're running into seemingly distro-specific failures to raise a
> > NullPointerException:
> > 
> > freenet.crypt.MessageAuthCodeTest.testVerifyDataNullInput1
> > freenet.crypt.MessageAuthCodeTest.testVerifyNullInput1
> > freenet.crypt.MessageAuthCodeTest.testVerifyNullInput2
> ...
> > We have yet to find a reason for this difference. These pass on 
> > Debian -
> > both Wheezy and sid - but fail on Arch and Fedora 22. Debian has 
> > Java
> > 1.6 / 1.8, Arch has Java 1.7, and Fedora has 1.8. Arch, Fedora, and
> > Debian all have JUnit 4.12 / Hamcrest 1.3.
> > 
> > Any suggestions for what to look into next?
> 
> Turns out in April 2015 [0] a patch changed the behavior to return 
> false
> on null input instead of throw. It's still certainly within the 
> Javadoc
> [1] so I don't think we can call it a bug.
> 
> This means different JVMs will either throw or not throw on null 
> input
> to MessageDigest.isEqual(), used by these functions, depending on
> whether they include that patch.
> 
> Any suggestions on how to deal with this? Do we have the Freenet 
> wrapper
> ensure it throws? Returns false?
> 
> 

return false is the safe option here.

Florent

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Devl mailing list
[email protected]
https://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to