-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/07/10 17:51, Felix Knecht wrote:
> 
>> Yes, this is the other option : not checking the keySerializer at all,
>> as the test always evaluate to true. But certainly not checking half of
>> the test (ie if ( keySerilizer != null ) then throw Exception),
>> otherwise, trust me, you'll get tens of failing tests !!

Either we throw an Exception when they are null or we can drop the 2 if
classes, do you agree?

Drop this
// This clause will never be true ...
if ( ( keySerializer != null ) && ! ( *true* ) )
{
    throw new IllegalArgumentException( I18n.err( I18n.ERR_520 ) );
}
if ( ( valueSerializer != null ) && !( *true* ) )
{
    throw new IllegalArgumentException( I18n.err( I18n.ERR_521 ) );
}

Throw exception when null
if ( ( keySerializer == null ) )
{
    throw new IllegalArgumentException( I18n.err( I18n.ERR_520 ) );
}
if ( ( valueSerializer == null ) )
{
    throw new IllegalArgumentException( I18n.err( I18n.ERR_521 ) );
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwNGBAACgkQ2lZVCB08qHEIKwCfYfc/YH8s4/nUBTtOEUCDIpy5
+YAAn2wt+7RWHaYNeFptaUxOF6GZfQ+p
=e4EF
-----END PGP SIGNATURE-----

Reply via email to