commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SHIN HWEI TAN (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COLLECTIONS-391) Inconsistent Javadoc comment and code for toProperties(final Map<K, V>) in org.apache.commons.collections.MapUtils
Date Sun, 08 Jan 2012 08:38:39 GMT
Inconsistent Javadoc comment and code for toProperties(final Map<K, V>) in org.apache.commons.collections.MapUtils
------------------------------------------------------------------------------------------------------------------

                 Key: COLLECTIONS-391
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-391
             Project: Commons Collections
          Issue Type: Bug
          Components: Collection
    Affects Versions: 4.0, 4.x
         Environment: Platform Indepedent
            Reporter: SHIN HWEI TAN


The Javadoc comment below states that the parameter map "..., may not be null":
   	   /**
	    ..
	     * @param map  the map to convert to a Properties object, may not be null
	     * @return the properties object
	     */
	    public static <K, V> Properties toProperties(final Map<K, V> map) {
	        Properties answer = new Properties();
	        if (map != null) {
	            ...
	        }
	        return answer;
	    }
However, the method return normally without throwing any exception when called with null.

Suggested Fixes:
1. Change "@param map  the map to convert to a Properties object, may not be null" to "@param
map  the map to convert to a Properties object, may be null"
or
2. Remove "may not be null" from @param.


--
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