Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-516

NullPointerException in MapUtils.toProperties

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: Collection
    • Labels:
      None
    • Environment:

      Mac OS 10.9, Java 6

      Description

      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.

        Attachments

        1. Report4.java
          0.7 kB
          Cyrille Artho

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Telcontar Cyrille Artho
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: