File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public String get(final int i) {
8888 }
8989
9090 /**
91- * Returns a value by name. If multiple instances of the header name exists, only the last occurence is returned.
91+ * Returns a value by name. If multiple instances of the header name exists, only the last occurrence is returned.
9292 *
9393 * <p>
9494 * Note: This requires a field mapping obtained from the original parser.
@@ -267,10 +267,11 @@ public Iterator<String> iterator() {
267267 * @since 1.9.0
268268 */
269269 public <M extends Map <String , String >> M putIn (final M map ) {
270- if (getHeaderMapRaw () == null ) {
270+ final Map <String , Integer > rawHeaderMap = getHeaderMapRaw ();
271+ if (rawHeaderMap == null ) {
271272 return map ;
272273 }
273- getHeaderMapRaw () .forEach ((key , value ) -> {
274+ rawHeaderMap .forEach ((key , value ) -> {
274275 if (value < values .length ) {
275276 map .put (key , values [value ]);
276277 }
@@ -312,7 +313,7 @@ public List<String> toList() {
312313
313314 /**
314315 * Copies this record into a new Map of header name to record value. If multiple instances of a header name exists,
315- * only the last occurence is mapped.
316+ * only the last occurrence is mapped.
316317 *
317318 * <p>
318319 * Editing the map does not update this instance.
You can’t perform that action at this time.
0 commit comments