From 1fe45e84b05ef33443073efc4eaf6be574ff184a Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 12 Apr 2024 17:28:41 +0000 Subject: [PATCH] slf4j 2.0.13 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1916936 13f79535-47bb-0310-9956-ffa450edef68 --- build.gradle | 2 +- build.xml | 2 +- poi-excelant/build.gradle | 2 +- poi-integration/build.gradle | 2 +- poi-ooxml/build.gradle | 2 +- .../poi/xssf/usermodel/TestXSSFTemp.java | 23 +++++++++++++++++++ 6 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTemp.java diff --git a/build.gradle b/build.gradle index 287e80a360..cc7aa55b14 100644 --- a/build.gradle +++ b/build.gradle @@ -153,7 +153,7 @@ subprojects { all { resolutionStrategy { force "commons-io:commons-io:${commonsIoVersion}" - force 'org.slf4j:slf4j-api:2.0.12' + force 'org.slf4j:slf4j-api:2.0.13' force 'com.fasterxml.woodstox:woodstox-core:6.6.2' } } diff --git a/build.xml b/build.xml index 504c792f91..63211b0d28 100644 --- a/build.xml +++ b/build.xml @@ -340,7 +340,7 @@ under the License. - + diff --git a/poi-excelant/build.gradle b/poi-excelant/build.gradle index 8e55d4488e..f3875e1030 100644 --- a/poi-excelant/build.gradle +++ b/poi-excelant/build.gradle @@ -43,7 +43,7 @@ dependencies { } testImplementation 'com.google.guava:guava:32.1.1-jre' testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" - testImplementation 'org.slf4j:slf4j-simple:2.0.12' + testImplementation 'org.slf4j:slf4j-simple:2.0.13' testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}" } diff --git a/poi-integration/build.gradle b/poi-integration/build.gradle index c826a9dcd1..343c9e0373 100644 --- a/poi-integration/build.gradle +++ b/poi-integration/build.gradle @@ -76,7 +76,7 @@ dependencies { } testImplementation project(path: ':poi-ooxml-lite-agent', configuration: 'archives') testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" - testImplementation 'org.slf4j:slf4j-simple:2.0.12' + testImplementation 'org.slf4j:slf4j-simple:2.0.13' testRuntimeOnly "org.apiguardian:apiguardian-api:${apiGuardianVersion}" } diff --git a/poi-ooxml/build.gradle b/poi-ooxml/build.gradle index 58f5f824f2..089eaf9bbc 100644 --- a/poi-ooxml/build.gradle +++ b/poi-ooxml/build.gradle @@ -125,7 +125,7 @@ dependencies { // prevent slf4j warnings coming from xmlsec -> slf4j-api 1.7.x dependency // see https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/ testImplementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}" - testImplementation 'org.slf4j:slf4j-simple:2.0.12' + testImplementation 'org.slf4j:slf4j-simple:2.0.13' broken("org.apache.xmlgraphics:batik-script:${batikVersion}"){ exclude group: 'xalan', module: 'xalan' diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTemp.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTemp.java new file mode 100644 index 0000000000..8f64fed626 --- /dev/null +++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFTemp.java @@ -0,0 +1,23 @@ +package org.apache.poi.xssf.usermodel; + +import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; +import org.junit.jupiter.api.Test; + +import java.io.IOException; + +public class TestXSSFTemp { + @Test + public void testWrite() throws IOException { + try(XSSFWorkbook wb = new XSSFWorkbook()) { + XSSFSheet sheet = wb.createSheet(); + XSSFRow row = sheet.createRow(0); + for (int i = 0; i < 10000; i++) { + XSSFCell cell = row.createCell(i); + cell.setCellValue("cell " + i); + } + try (UnsynchronizedByteArrayOutputStream bos = UnsynchronizedByteArrayOutputStream.builder().get()) { + wb.write(bos); + } + } + } +}