commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (COLLECTIONS-516) NullPointerException in MapUtils.toProperties
Date Mon, 19 May 2014 20:39:39 GMT

     [ https://issues.apache.org/jira/browse/COLLECTIONS-516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Neidhart resolved COLLECTIONS-516.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1

Added javadoc clarification in r1596050.

Thanks for the report!

> NullPointerException in MapUtils.toProperties
> ---------------------------------------------
>
>                 Key: COLLECTIONS-516
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-516
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Collection
>    Affects Versions: 4.0
>         Environment: Mac OS 10.9, Java 6
>            Reporter: Cyrille Artho
>             Fix For: 4.1
>
>         Attachments: Report4.java
>
>
> calling MapUtils.toProperties with a map having null entries results in a NullPointerException.
In this case the Map has only entry <null, null>.
> However, javadoc states "A null input will return an empty
> properties object." so (1) this should be clarified as it would
> only apply to the map reference itself, not its contents, or (2)
> an empty property object should be generated for null entries in
> the map as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message