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

reschke pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 12d08321cf OAK-12264: oak-run: sync commons-csv dependency with other 
modules (#2963)
12d08321cf is described below

commit 12d08321cfb4c735c06dad66d575ae0f20c89df4
Author: Julian Reschke <[email protected]>
AuthorDate: Fri Jun 19 09:29:43 2026 +0200

    OAK-12264: oak-run: sync commons-csv dependency with other modules (#2963)
---
 oak-run/pom.xml                                                         | 1 -
 .../java/org/apache/jackrabbit/oak/plugins/tika/CSVFileGenerator.java   | 2 ++
 .../jackrabbit/oak/plugins/tika/CSVFileBinaryResourceProviderTest.java  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/oak-run/pom.xml b/oak-run/pom.xml
index b110f1f64b..b947e44014 100644
--- a/oak-run/pom.xml
+++ b/oak-run/pom.xml
@@ -319,7 +319,6 @@
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-csv</artifactId>
-      <version>1.1</version>
     </dependency>
     <dependency>
       <groupId>commons-codec</groupId>
diff --git 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileGenerator.java
 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileGenerator.java
index 7539e7d788..16b7cc9f2f 100644
--- 
a/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileGenerator.java
+++ 
b/oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileGenerator.java
@@ -45,6 +45,8 @@ public class CSVFileGenerator {
         try {
             CSVPrinter printer = new CSVPrinter(new BufferedWriter(new 
FileWriter(outFile, StandardCharsets.UTF_8)),
                     CSVFileBinaryResourceProvider.FORMAT);
+            // commons-csv 1.2+ no longer auto-writes the header on 
construction; must be explicit
+            printer.printRecord((Object[]) 
CSVFileBinaryResourceProvider.FORMAT.getHeader());
             closer.register(printer);
             for (BinaryResource br : binaries){
                 count++;
diff --git 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileBinaryResourceProviderTest.java
 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileBinaryResourceProviderTest.java
index a12ee07fd7..de8b8e1c48 100644
--- 
a/oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileBinaryResourceProviderTest.java
+++ 
b/oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/tika/CSVFileBinaryResourceProviderTest.java
@@ -41,6 +41,7 @@ public class CSVFileBinaryResourceProviderTest {
     public void testGetBinaries() throws Exception {
         StringBuilder sb = new StringBuilder();
         CSVPrinter p = new CSVPrinter(sb, 
CSVFileBinaryResourceProvider.FORMAT);
+        p.printRecord((Object[]) 
CSVFileBinaryResourceProvider.FORMAT.getHeader());
         // BLOB_ID, LENGTH, JCR_MIMETYPE, JCR_ENCODING, JCR_PATH
         p.printRecord("a", 123, "text/plain", null, "/a");
         p.printRecord("a2", 123, "text/plain", null, "/a/c");

Reply via email to