/** * Sets the property on the business object * * @param value the substring of the parsed line to set * @param businessObject the business object to set the parsed line on * @param lineNumber the parsed line number */ @Override public void setProperty(String value, Object businessObject, int lineNumber) { if (leftTrim) { value = StringUtils.trimLeadingWhitespace(value); } if (rightTrim) { value = StringUtils.trimTrailingWhitespace(value); } try { PropertyUtils.setProperty( businessObject, propertyName, getFormattedObject(value, businessObject)); } catch (Exception e) { throw new RuntimeException( "Exception occurred on line " + lineNumber + " while setting value " + value + " for property " + propertyName + ".", e); } }