commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeanette Winzenburg (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CSV-100) CSVParser: getHeaderMap throws NPE
Date Wed, 18 Sep 2013 13:01:52 GMT
Jeanette Winzenburg created CSV-100:
---------------------------------------

             Summary: CSVParser: getHeaderMap throws NPE 
                 Key: CSV-100
                 URL: https://issues.apache.org/jira/browse/CSV-100
             Project: Commons CSV
          Issue Type: Bug
          Components: Parser
         Environment: commons-cvs version is the git-clone of current trunk
            Reporter: Jeanette Winzenburg


title nearly says it all :-) 

Given a CSVParser parser, the following line throws an NPE:

{code}
Map<String, Integer> header = parser.getHeaderMap();
{code}

Stacktrace: 

{noformat}
Caused by: java.lang.NullPointerException
at java.util.HashMap.<init>(HashMap.java:318)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:212)
at org.apache.commons.csv.CSVParser.getHeaderMap(CSVParser.java:288)
{noformat}

happens if the format doesn't have a headerMap.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message