This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-csv.git

commit 2e7afc06961bc4fc43be2699f3135478e03101dc
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jul 23 07:38:46 2026 -0400

    Deference parser variable once.
---
 src/main/java/org/apache/commons/csv/CSVRecord.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/csv/CSVRecord.java 
b/src/main/java/org/apache/commons/csv/CSVRecord.java
index 3cca402e..414a45b0 100644
--- a/src/main/java/org/apache/commons/csv/CSVRecord.java
+++ b/src/main/java/org/apache/commons/csv/CSVRecord.java
@@ -287,10 +287,11 @@ public final class CSVRecord implements Serializable, 
Iterable<String> {
      * @since 1.9.0
      */
     public <M extends Map<String, String>> M putIn(final M map) {
-        if (getHeaderMapRaw() == null) {
+        final Map<String, Integer> headerMap = getHeaderMapRaw();
+        if (headerMap == null) {
             return map;
         }
-        getHeaderMapRaw().forEach((key, value) -> {
+        headerMap.forEach((key, value) -> {
             if (value < values.length) {
                 map.put(key, values[value]);
             }

Reply via email to