commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Maryns (JIRA)" <>
Subject [jira] Commented: (COLLECTIONS-215) Javadoc in DefaultedMap very inconsistent
Date Fri, 14 Jul 2006 09:24:31 GMT
    [ ]

Hendrik Maryns commented on COLLECTIONS-215:

I don't see a reason not to add the extra constructors.  They do seem useful.  Then you can
explicitly state in their javadoc the behaviour of the get method.  Because if you only read
the class javadoc, and one actually wants to have a transformer returned as default object
instead of it being used, the class is unusable, even more, it does not comply to the spec.

And there is one more javadoc inconsistency you overlooked: 

-     * @throws IllegalArgumentException if map or transformer is null

+     * @throws IllegalArgumentException if map or value is null


     protected DefaultedMap(Map map, Object value) {

<rant> Why do you (pl.) have this habit of making everything protected, it makes it
so difficult to fix things and makes for much more complicated code! </rant>

> Javadoc in DefaultedMap very inconsistent
> -----------------------------------------
>          Key: COLLECTIONS-215
>          URL:
>      Project: Commons Collections
>         Type: Improvement

>     Versions: 3.2
>     Reporter: Hendrik Maryns
>     Assignee: Stephen Colebourne
>      Fix For: 3.3
>  Attachments: DefaultedMap.diff
> 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  :-) 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message