commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-389) Inconsistent Javadoc comment and code for mapTransformer(Map<? super I, ? extends O>) in org.apache.commons.collections.TransformerUtils
Date Mon, 09 Apr 2012 17:35:17 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13249986#comment-13249986
] 

Hudson commented on COLLECTIONS-389:
------------------------------------

Integrated in commons-collections #16 (See [https://builds.apache.org/job/commons-collections/16/])
    [COLLECTIONS-389] Fixed javadoc, thanks to Shin Hwei Tan. (Revision 1311337)

     Result = SUCCESS
tn : http://svn.apache.org/viewvc/?view=rev&rev=1311337
Files : 
* /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/TransformerUtils.java

                
> Inconsistent Javadoc comment and code for mapTransformer(Map<? super I, ? extends
O>) in org.apache.commons.collections.TransformerUtils
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-389
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-389
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Collection
>    Affects Versions: 4.0, 4.x
>         Environment: Platform Independent
>            Reporter: SHIN HWEI TAN
>              Labels: javadoc, null
>             Fix For: 4.0
>
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> The Javadoc comment below states that the method "throws IllegalArgumentException if
the map is null":
>    	    /** 
> 	     ....
> 	     * @param map  the map to use to transform the objects
> 	     * @return the transformer
> 	     * @throws IllegalArgumentException if the map is null
> 	     */
> 	    public static <I, O> Transformer<I, O> mapTransformer(Map<? super
I, ? extends O> map) {
> 	        return MapTransformer.mapTransformer(map);
> 	    }
> However, the method returns a NULL_INSTANCE object instead of throwing IllegalArgumentException
when called with null.
> Suggested Fixes:
> 1. Change "@throws IllegalArgumentException if the map is null" and "@return" to "@return
NULL_INSTANCE if the map is null".
> or
> 2. Remove the entire "throws IllegalArgumentException if the map is null".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message