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 ca2e6e7527d9b04e54f10f949d3c2180203e5660
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Thu Jan 2 17:22:27 2025 -0500

    Add missing tests
---
 src/test/java/org/apache/commons/csv/CSVPrinterTest.java | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java 
b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
index e0f0de15..b4b560a1 100644
--- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
+++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java
@@ -183,6 +183,8 @@ public class CSVPrinterTest {
         // Use withHeaderComments first to test CSV-145
         // @formatter:off
         final CSVFormat format = baseFormat.builder()
+                .setHeaderComments((String[]) null) // don't blow up
+                .setHeaderComments((Object[]) null) // don't blow up
                 .setHeaderComments("Generated by Apache Commons CSV 1.1", now)
                 .setCommentMarker('#')
                 .setHeader("Col1", "Col2")
@@ -500,6 +502,15 @@ public class CSVPrinterTest {
         }
     }
 
+    @SuppressWarnings("unlikely-arg-type")
+    @Test
+    public void testEquals() throws IOException {
+        // Don't use assertNotEquals here
+        assertFalse(CSVFormat.DEFAULT.equals(null));
+        // Don't use assertNotEquals here
+        assertFalse(CSVFormat.DEFAULT.equals(""));
+    }
+
     @Test
     public void testEscapeBackslash1() throws IOException {
         final StringWriter sw = new StringWriter();

Reply via email to