We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 084333f commit 74ce045Copy full SHA for 74ce045
1 file changed
src/main/java/org/apache/commons/csv/CSVParser.java
@@ -495,7 +495,7 @@ private Headers createHeaders() throws IOException {
495
if (headerRecord != null) {
496
for (int i = 0; i < headerRecord.length; i++) {
497
final String header = headerRecord[i];
498
- final boolean containsHeader = header == null ? false : hdrMap.containsKey(header);
+ final boolean containsHeader = header != null && hdrMap.containsKey(header);
499
final boolean emptyHeader = header == null || header.trim().isEmpty();
500
if (containsHeader) {
501
if (!emptyHeader && !this.format.getAllowDuplicateHeaderNames()) {
0 commit comments