File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -490,11 +490,10 @@ private Headers createHeaderMapAndHeaderNames() throws IOException {
490490 final boolean emptyHeader = header == null || header .trim ().isEmpty ();
491491 if (containsHeader && !emptyHeader && !this .format .getAllowDuplicateHeaderNames ()) {
492492 throw new IllegalArgumentException ("The header contains a duplicate name: \" " + header
493- + "\" in " + Arrays .toString (headerRecord ) + ". If your data is valid then use CSVFormat.withAllowDuplicateHeaderNames()." );
493+ + "\" in " + Arrays .toString (headerRecord ) + ". If this is valid then use CSVFormat.withAllowDuplicateHeaderNames()." );
494494 }
495- if (containsHeader && (emptyHeader && !this .format .getAllowMissingColumnNames ())) {
496- throw new IllegalArgumentException ("The header contains a duplicate name: \" " + header
497- + "\" in " + Arrays .toString (headerRecord ));
495+ if (containsHeader && emptyHeader && !this .format .getAllowMissingColumnNames ()) {
496+ throw new IllegalArgumentException ("A header name is missing in " + Arrays .toString (headerRecord ));
498497 }
499498 if (header != null ) {
500499 hdrMap .put (header , Integer .valueOf (i ));
You can’t perform that action at this time.
0 commit comments