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