Skip to content

Commit eb1f92c

Browse files
new bug
Return null instead of throwing an exception when mapping is not found.
1 parent b6ab627 commit eb1f92c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/apache/commons/csv/CSVRecord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public String get(final String name) {
129129
}
130130
final Integer index = headerMap.get(name);
131131
if (index == null) {
132-
throw new IllegalArgumentException(String.format("Mapping for %s not found, expected one of %s", name, headerMap.keySet()));
132+
return null;
133133
}
134134
try {
135135
return values[index.intValue()]; // Explicit (un)boxing is intentional

0 commit comments

Comments
 (0)