From b15b126b8c029d32d7721ff1b37467582ffaaa1e Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Tue, 20 Aug 2024 08:16:10 +0200 Subject: Update commons-compress in babel - update commons-compress - bump snapshot version to 1.13.3-SNAPSHOT Issue-ID: AAI-3974 Change-Id: Iae107c5e32edbf92a8acac0a12e90d6347a7bae6 Signed-off-by: Fiete Ostkamp --- pom.xml | 7 ++++--- .../java/org/onap/aai/babel/csar/extractor/YamlExtractor.java | 10 ++++++---- version.properties | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index a55342f..1cabfcd 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ org.onap.aai babel - 1.13.2-SNAPSHOT + 1.13.3-SNAPSHOT jar aai-babel @@ -92,7 +92,8 @@ 3.0.13 2020.0.2 - 1.22 + 1.27.0 + 2.16.1 1.15 2.1.1 @@ -763,4 +764,4 @@ - \ No newline at end of file + diff --git a/src/main/java/org/onap/aai/babel/csar/extractor/YamlExtractor.java b/src/main/java/org/onap/aai/babel/csar/extractor/YamlExtractor.java index 424e661..df6e6ba 100644 --- a/src/main/java/org/onap/aai/babel/csar/extractor/YamlExtractor.java +++ b/src/main/java/org/onap/aai/babel/csar/extractor/YamlExtractor.java @@ -66,12 +66,14 @@ public class YamlExtractor { List ymlFiles = new ArrayList<>(); try (SeekableInMemoryByteChannel inMemoryByteChannel = new SeekableInMemoryByteChannel(archive); - ZipFile zipFile = new ZipFile(inMemoryByteChannel)) { - for (Enumeration enumeration = zipFile.getEntries(); enumeration.hasMoreElements();) { + ZipFile zipFile = new ZipFile(inMemoryByteChannel)) { + Enumeration enumeration = zipFile.getEntries(); + while(enumeration.hasMoreElements()) { ZipArchiveEntry entry = enumeration.nextElement(); if (fileShouldBeExtracted(entry)) { - ymlFiles.add(ModelGenerator.createArtifact(IOUtils.toByteArray(zipFile.getInputStream(entry)), - entry.getName(), version)); + Artifact artifact = ModelGenerator.createArtifact(IOUtils.toByteArray(zipFile.getInputStream(entry)), + entry.getName(), version); + ymlFiles.add(artifact); } } if (ymlFiles.isEmpty()) { diff --git a/version.properties b/version.properties index f356022..776da6a 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ major=1 minor=13 -patch=2 +patch=3 base_version=${major}.${minor}.${patch} -- cgit