mirror of
https://github.com/apache/commons-csv.git
synced 2025-02-18 07:56:33 +00:00
User ternary expression
This commit is contained in:
parent
46f5fef4f4
commit
8a8c913a10
@ -524,12 +524,8 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (headerNames == null) {
|
||||
headerNames = Collections.emptyList(); // immutable
|
||||
} else {
|
||||
headerNames = Collections.unmodifiableList(headerNames);
|
||||
}
|
||||
return new Headers(hdrMap, headerNames);
|
||||
// Make header names Collection immutable
|
||||
return new Headers(hdrMap, headerNames == null ? Collections.emptyList() : Collections.unmodifiableList(headerNames));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user