diff --git a/Dockerfile b/Dockerfile index 6a3c172..cf0f001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ COPY src ./src RUN mvn clean package --no-transfer-progress -DskipTests RUN mvn versions:display-dependency-updates --no-transfer-progress -FROM eclipse-temurin:17-jre +FROM eclipse-temurin:17-jre-jammy ENV TZ=Europe/Oslo RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone WORKDIR /app diff --git a/pom.xml b/pom.xml index 5eb409b..d5c138f 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 3.2.3 + 3.3.3 @@ -24,9 +24,9 @@ ${java.release} ${java.release} - 1.9.23 - 4.9.0 - 2.17.0 + 2.0.20 + 5.1.0 + 2.17.2 @@ -52,7 +52,7 @@ net.logstash.logback logstash-logback-encoder - 7.4 + 8.0 @@ -95,25 +95,25 @@ org.apache.commons commons-csv - 1.10.0 + 1.11.0 org.apache.poi poi - 5.2.3 + 5.3.0 org.apache.poi poi-ooxml - 5.2.3 + 5.3.0 org.apache.tika tika-core - 2.9.1 + 2.9.2 @@ -131,13 +131,13 @@ org.mockito.kotlin mockito-kotlin - 5.1.0 + 5.4.0 test org.wiremock wiremock-standalone - 3.4.2 + 3.9.1 test @@ -155,7 +155,7 @@ commons-io commons-io - 2.13.0 + 2.16.1 compile @@ -172,7 +172,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.4.0 + 3.6.0 add-source @@ -224,7 +224,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.1.2 + 3.5.0 false unit @@ -237,7 +237,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.1.2 + 3.5.0 integration unit diff --git a/src/main/kotlin/no/fdk/dataset/preview/service/PreviewService.kt b/src/main/kotlin/no/fdk/dataset/preview/service/PreviewService.kt index 4c5d12d..9ecbf8c 100644 --- a/src/main/kotlin/no/fdk/dataset/preview/service/PreviewService.kt +++ b/src/main/kotlin/no/fdk/dataset/preview/service/PreviewService.kt @@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory import org.springframework.stereotype.Service import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream +import java.io.IOException import java.io.InputStream import java.io.InputStreamReader import java.nio.charset.Charset @@ -157,7 +158,12 @@ class PreviewService( zipEntry = zis.nextEntry } } finally { - zis.closeEntry() + try { + zis.closeEntry() + } catch (ex: IOException) { + // Ignore if reason is already closed zipEntry-stream + if (ex.message != "Stream closed") throw ex + } zis.close() }