diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-16 15:03:38 +0000 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2022-11-16 15:03:38 +0000 |
commit | 0b4016fbde53d49f9511a4253e22285681840572 (patch) | |
tree | 284fc336fe2d9e1f4d93335293143f739d371bbd /src/main | |
parent | 50889fa7107127868a9a4391218772ff58d0ac2e (diff) |
Replace deprecated methods in model-loader
- junit's assertThat was deprecated in favour of hamcrest
- apache-commons now requires a Charset argument
Issue-ID: AAI-3604
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I10bf46922e44b3a3adcc14eab6486401a5cf14e1
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/aai/modelloader/config/ModelLoaderConfig.java | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/aai/modelloader/extraction/VnfCatalogExtractor.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/onap/aai/modelloader/config/ModelLoaderConfig.java b/src/main/java/org/onap/aai/modelloader/config/ModelLoaderConfig.java index 77693bc..a49288d 100644 --- a/src/main/java/org/onap/aai/modelloader/config/ModelLoaderConfig.java +++ b/src/main/java/org/onap/aai/modelloader/config/ModelLoaderConfig.java @@ -28,10 +28,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Properties; + import org.apache.commons.lang3.StringUtils; import org.eclipse.jetty.util.security.Password; import org.onap.sdc.api.consumer.IConfiguration; -import org.springframework.core.env.Environment; /** * Properties for the Model Loader diff --git a/src/main/java/org/onap/aai/modelloader/extraction/VnfCatalogExtractor.java b/src/main/java/org/onap/aai/modelloader/extraction/VnfCatalogExtractor.java index 0e27d57..3dbdfcc 100644 --- a/src/main/java/org/onap/aai/modelloader/extraction/VnfCatalogExtractor.java +++ b/src/main/java/org/onap/aai/modelloader/extraction/VnfCatalogExtractor.java @@ -21,10 +21,12 @@ package org.onap.aai.modelloader.extraction; import java.io.IOException; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.regex.Pattern; + import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.compress.utils.SeekableInMemoryByteChannel; @@ -75,7 +77,7 @@ public class VnfCatalogExtractor { ZipArchiveEntry entry = enumeration.nextElement(); if (fileShouldBeExtracted(entry)) { vnfcFiles.add(new VnfCatalogArtifact(ArtifactType.VNF_CATALOG_XML, - IOUtils.toString(zipFile.getInputStream(entry)))); + IOUtils.toString(zipFile.getInputStream(entry), Charset.defaultCharset()))); } } } catch (IOException e) { |