dan-s1 commented on code in PR #8229: URL: https://github.com/apache/nifi/pull/8229#discussion_r1452648947
########## nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateCsv.java: ########## @@ -619,18 +632,83 @@ public NifiCsvListReader(Reader reader, CsvPreference preferences) { super(reader, preferences); } - @Override - public List<Object> read(CellProcessor... processors) throws IOException { + public List<Object> read(boolean getAllViolations, CellProcessor... processors) throws IOException { if( processors == null ) { throw new NullPointerException("Processors should not be null"); } if( readRow() ) { - super.executeProcessors(new ArrayList<Object>(getColumns().size()), processors); + executeProcessors(new ArrayList<Object>(getColumns().size()), processors, getAllViolations); return new ArrayList<Object>(getColumns()); } return null; // EOF } + protected List<Object> executeProcessors(List<Object> processedColumns, CellProcessor[] processors, boolean getAllViolations) { + this.executeCellProcessors(processedColumns, getColumns(), processors, getLineNumber(), getRowNumber(), getAllViolations); + return processedColumns; + } + + private void executeCellProcessors(final List<Object> destination, final List<?> source, + final CellProcessor[] processors, final int lineNo, final int rowNo, boolean getAllViolations) { + + if( destination == null ) { + throw new NullPointerException("destination should not be null"); + } else if( source == null ) { + throw new NullPointerException("source should not be null"); + } else if( processors == null ) { + throw new NullPointerException("processors should not be null"); + } Review Comment: I understand but it seems redundant as I pointed out. Even it would be necessary to throw an exception, I believe `IllegalArgumentException` would be more appropriate. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org