Simplify boolean expression: emptyHeader will always be true when reached.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1742466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4901f1ccdc
commit
cf1460b21e
|
@ -403,8 +403,7 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
|
|||
final String header = headerRecord[i];
|
||||
final boolean containsHeader = hdrMap.containsKey(header);
|
||||
final boolean emptyHeader = header == null || header.trim().isEmpty();
|
||||
if (containsHeader &&
|
||||
(!emptyHeader || (emptyHeader && !this.format.getAllowMissingColumnNames()))) {
|
||||
if (containsHeader && (!emptyHeader || !this.format.getAllowMissingColumnNames())) {
|
||||
throw new IllegalArgumentException("The header contains a duplicate name: \"" + header +
|
||||
"\" in " + Arrays.toString(headerRecord));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue