summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-02-08 17:35:12 +0000
committerGerrit Code Review <gerrit@onap.org>2023-02-08 17:35:12 +0000
commitef200d43e3d2dc2be292bd76a8963cbb711247e7 (patch)
treeeab13139e7a4cbc9214e309b5756ee953719801d
parentd3eff8e28514075ab30a1013ae29194eab35958c (diff)
parentabdebae6d193b8a7d44b5444947af8b954bb7271 (diff)
Merge "Correct calculation of zip archive size for schemaset upload"
-rw-r--r--cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java
index d5c2b092b0..534077caa6 100644
--- a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java
+++ b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java
@@ -136,7 +136,7 @@ public class MultipartFileUtil {
while ((numberOfBytesRead = zipInputStream.read(buffer, 0, READ_BUFFER_SIZE)) > 0) {
byteArrayOutputStream.write(buffer, 0, numberOfBytesRead);
totalSizeEntry += numberOfBytesRead;
- zipFileSizeValidator.updateTotalSizeArchive(totalSizeEntry);
+ zipFileSizeValidator.updateTotalSizeArchive(numberOfBytesRead);
zipFileSizeValidator.validateCompresssionRatio(totalSizeEntry);
}
return byteArrayOutputStream.toString(StandardCharsets.UTF_8);