commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hendrik Maryns <hend...@sfs.uni-tuebingen.de>
Subject [Collections] Javadoc in DefaultedMap very inconsistent
Date Thu, 06 Jul 2006 08:03:39 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

The javadocs in DefaultedMap is very inconsistent.  It speaks of factory
when a transformer is meant, it speaks of transformer when value is
meant and that sort of stuff.

Besides, it would be much cleaner to declare ‘value’ of type
Transformer, and create a transformer every time, except when one is
passed (the instanceof checks are wrong anyway), (I’d rename it to
transformer, too).

Even nicer would be to split up the constructor(s) into one that takes a
value, and one that takes a Transformer, no instanceof checks needed,
much cleaner code, generification is almost trivial :-)

I attached what I made of it, removing the generic markers gives a
perfectly legal 1.4 file.

Cheers, H.
- --
Hendrik Maryns

==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFErMPbf8wVQAnB0SYRAu60AKCq0SVLWqsrtU1cPxgg7fYedINt6QCdEaA6
wS1HIyV1m8t7VjdpbSYUKvg=
=+2V8
-----END PGP SIGNATURE-----

Mime
View raw message