From 2908a8b51cdf2d04135250c7b2c2dfa7ee1c806d Mon Sep 17 00:00:00 2001
From: Joerg Bolay <joerg.bolay@dataport.de>
Date: Fri, 14 Jun 2024 11:16:53 +0200
Subject: [PATCH] OZG-5412 fix missing method in ZipFileExtractor

---
 .../java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java
index ed6cf3667..8f162061d 100644
--- a/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java
+++ b/xta-adapter/src/main/java/de/ozgcloud/eingang/xta/zip/ZipFileExtractor.java
@@ -41,8 +41,8 @@ public class ZipFileExtractor {
 	}
 
 	private void verifySizeLimit(long uncompressedSize) {
-		if (uncompressedSize > ZIP_MAX_TOTAL_SIZE) {
-			throw new TechnicalException("Expect uncompressed size %s to be smaller than %d!".formatted(uncompressedSize, ZIP_MAX_TOTAL_SIZE));
+		if (uncompressedSize > getZipMaxTotalSize()) {
+			throw new TechnicalException("Expect uncompressed size %s to be smaller than %d!".formatted(uncompressedSize, getZipMaxTotalSize()));
 		}
 	}
 
@@ -55,6 +55,9 @@ public class ZipFileExtractor {
 		}
 	}
 
+	int getZipMaxTotalSize() {
+		return ZIP_MAX_TOTAL_SIZE;
+	}
 
 	Long sumUncompressedEntrySizes(File zipFile) {
 		return mapZipEntries(zipFile, ReadableZipEntry::getPositiveSize)
-- 
GitLab