title: How to get MappingIterator to not include empty rows?
body: <p>Thanks for taking a look at this.</p>
  
  <p>I'm parsing csv files and ran into an issue where if the file contains a blank line at the end of it, it breaks things. The easy work-around is to just delete the blank row at the end of the file but I would much rather know how to configure this to ignore the blank row at the end if it is present.</p>
  
  <p>I've transcribed the code from my other system here to show how I'm creating the MappingIterator</p>
  
  <p>For a valid row of data it runs fine but I'm running into an issue where if a csv file contains a blank line at the end of the file I end up with a null pointer exception.</p>
  
  <p>The mappingIterator will contain for a blank line a key of col_a with a null value for it and nothing else.</p>
  
  <p>How am I to get this to ignore the blank line?</p>
  
  <p>Here is a code sample</p>
  
  <pre><code>private MappingIterator getMappingIteratorCsv(InputStream inputStream) {
      logger.info("Processing ");
  
      CsvMapper mapper = new CsvMapper();
      mapper.enable(CsvParser.Feature.SKIP_EMPTY_LINES);
      mapper.enable(CsvParser.Feature.WRAP_AS_ARRAY);
  
      CsvSchema.Builder schemaBuilder = CsvSchema.builder().setColumnSeparator(',');
      schemaBuilder.addColumn("col_a");
      schemaBuilder.addColumn("col_b");
      schemaBuilder.addColumn("col_c");
  
      CsvSchema schema = schemaBuilder.build();
  
      MappingIterator&lt;Map&lt;String, String&gt;&gt; mappingIterator;
  
      mappingIterator = mapper.readerFor(Map.class).with(schema).readValues(inputStream);
  
      return mappingIterator;
  }
  </code></pre>