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

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

commit 46f5fef4f4731fea015b6cd507bbdb6c30437cf1
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Apr 6 08:38:15 2024 -0400

    Lexer is never null
---
 src/main/java/org/apache/commons/csv/CSVParser.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java 
b/src/main/java/org/apache/commons/csv/CSVParser.java
index dc6893a0..bdc6e815 100644
--- a/src/main/java/org/apache/commons/csv/CSVParser.java
+++ b/src/main/java/org/apache/commons/csv/CSVParser.java
@@ -451,9 +451,7 @@ public final class CSVParser implements 
Iterable<CSVRecord>, Closeable {
      */
     @Override
     public void close() throws IOException {
-        if (lexer != null) {
-            lexer.close();
-        }
+        lexer.close();
     }
 
     private Map<String, Integer> createEmptyHeaderMap() {

Reply via email to