tab police

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1593097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2014-05-07 18:12:10 +00:00
parent 7945a4f24c
commit 16b175b01a

View File

@ -311,15 +311,15 @@ public final class CSVFormat implements Serializable {
this.recordSeparator = recordSeparator;
this.nullString = nullString;
if (header == null) {
this.header = null;
this.header = null;
} else {
Set<String> dupCheck = new HashSet<String>();
for(String hdr : header) {
if (!dupCheck.add(hdr)) {
throw new IllegalArgumentException("The header contains a duplicate entry: '" + hdr + "' in " + Arrays.toString(header));
}
}
this.header = header.clone();
Set<String> dupCheck = new HashSet<String>();
for(String hdr : header) {
if (!dupCheck.add(hdr)) {
throw new IllegalArgumentException("The header contains a duplicate entry: '" + hdr + "' in " + Arrays.toString(header));
}
}
this.header = header.clone();
}
this.skipHeaderRecord = skipHeaderRecord;
}