directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Re: [SHARED] LdapTransformer NPE
Date Sun, 23 May 2010 09:17:21 GMT
On 5/23/10 9:02 AM, Felix Knecht wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In the switch block the 'default' is missing. For unknown types will
> will run into a NPE on the following line [1]. What shall be done on
> default case?
> - - Return null
> - - Throw an Exception (to be defined)
> - - Risk a NPE
> - - ?
>    
The Transformer is transforming a Ldap Message from an external form to 
an internal form, FYI. The number of Ldap Message we are dealing with is 
finite, and we won't ever have to deal with any other unexpected one. So 
the default value is useless.

"risk a NPE" is the choice here, as this risk is null.

btw, this transformer is likelly to be removed soon.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message