protected void validateDelimiters ( String rowDelimiter , String columnDelimiter ) throws Exception { if ( rowDelimiter . equals ( columnDelimiter ) ) { throw new Exception ( INVALID_DELIMITERS ) ; } if ( StringUtils . contains ( columnDelimiter , rowDelimiter ) ) { throw new Exception ( INVALID_ROW_DELIMITER ) ; } }
This method checks if the delimiters are equal and if the row delimiter is a substring of the column delimiter and throws an exception with the appropriate message .