pentaho/pentaho-kettle — pull request #103 by prakapenka (2013-11-22 14:54:39+00:00)
Title: [PDI-6532] The EMail Messages Input step is throwing an exception during preview when "Mail Header(Name)" is included in the "Fields" list

1) engine/src/org/pentaho/di/trans/steps/mailinput/MailInput.java
Extract parse email Message functionality to inner class to have ability to isolate unit-testing of this functionality.

2) for [PDI-6532] fix - to avoid situation when call to 'message.getHeader( name )' throwing exception if there is not such header - we will look for matching headers for given name. If there us no matching headers - we will return empty String. Otherwise - we will iterate through headers concatenating their values. Usually, since we are using only one String for one Header - there will be one Header in collection.