diff options
author | Murali-P <murali.p@huawei.com> | 2018-03-08 14:42:01 +0530 |
---|---|---|
committer | Murali-P <murali.p@huawei.com> | 2018-03-08 14:43:23 +0530 |
commit | 37945bf2f9b95a4c24ccc6ba09c2132c406c8f7e (patch) | |
tree | eaa1626e3549e54bfdde6492024f98469b2b9db1 /vnfmarket-be/vnf-sdk-marketplace/src/main | |
parent | 6662326cf9d5549d2acd03ec14fda8e82e0ca618 (diff) |
Improve code coverage
Code coverage is less than 50%
Issue-ID: VNFSDK-159
Change-Id: Icf972fbc3754c3bfd495e5786fea53fbdf9c3fd5
Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src/main')
-rw-r--r-- | vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java index a5ca6ac1..073bb3eb 100644 --- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java @@ -21,7 +21,6 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStream; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; @@ -48,7 +47,7 @@ public final class FileUtil { private static final int TRY_COUNT = 3; private FileUtil() { - // Empty constructor + //Empty constructor } /** @@ -139,64 +138,6 @@ public final class FileUtil { return unzipFileNams; } - /** - * close InputStream. - * - * @param inputStream - * the inputstream to close - */ - public static void closeInputStream(InputStream inputStream) { - try { - if (inputStream != null) { - inputStream.close(); - } - } catch (Exception e1) { - logger.info("error while closing InputStream!", e1); - } - } - - /** - * close OutputStream. - * - * @param outputStream - * the output stream to close - */ - public static void closeOutputStream(OutputStream outputStream) { - try { - if (outputStream != null) { - outputStream.close(); - } - } catch (Exception e1) { - logger.info("error while closing OutputStream!", e1); - } - } - - public static void closeFileStream(FileInputStream ifs) { - try { - if (ifs != null) { - ifs.close(); - } - } catch (Exception e1) { - logger.info("error while closing OutputStream", e1); - } - } - - /** - * close zipFile. - * - * @param zipFile - * the zipFile to close - */ - public static void closeZipFile(ZipFile zipFile) { - try { - if (zipFile != null) { - zipFile.close(); - } - } catch (IOException e1) { - logger.info("close ZipFile error!", e1); - } - } - public static boolean checkFileExists(String filePath) { File file = new File(filePath); return file.exists(); |