diff options
author | 2024-08-20 08:16:10 +0200 | |
---|---|---|
committer | 2024-08-20 08:16:10 +0200 | |
commit | b15b126b8c029d32d7721ff1b37467582ffaaa1e (patch) | |
tree | 3e139c84b9decae1216c79a685b410ac9df3866d | |
parent | 5bcc68e2bbe11cd2193b804396c6943942081b8c (diff) |
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 <Fiete.Ostkamp@telekom.de>
-rw-r--r-- | pom.xml | 7 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/babel/csar/extractor/YamlExtractor.java | 10 | ||||
-rw-r--r-- | version.properties | 2 |
3 files changed, 11 insertions, 8 deletions
@@ -33,7 +33,7 @@ <groupId>org.onap.aai</groupId> <artifactId>babel</artifactId> - <version>1.13.2-SNAPSHOT</version> + <version>1.13.3-SNAPSHOT</version> <packaging>jar</packaging> <name>aai-babel</name> @@ -92,7 +92,8 @@ <groovy.version>3.0.13</groovy.version> <spring-cloud.version>2020.0.2</spring-cloud.version> - <commons.compress.version>1.22</commons.compress.version> + <commons.compress.version>1.27.0</commons.compress.version> + <commons.io.version>2.16.1</commons.io.version> <commons.codec.version>1.15</commons.codec.version> <javax.ws.rs.version>2.1.1</javax.ws.rs.version> @@ -763,4 +764,4 @@ </plugins> </build> -</project>
\ No newline at end of file +</project> 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<Artifact> ymlFiles = new ArrayList<>(); try (SeekableInMemoryByteChannel inMemoryByteChannel = new SeekableInMemoryByteChannel(archive); - ZipFile zipFile = new ZipFile(inMemoryByteChannel)) { - for (Enumeration<ZipArchiveEntry> enumeration = zipFile.getEntries(); enumeration.hasMoreElements();) { + ZipFile zipFile = new ZipFile(inMemoryByteChannel)) { + Enumeration<ZipArchiveEntry> 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} |