Improve code coverage 15/34715/1
authorMurali-P <murali.p@huawei.com>
Thu, 8 Mar 2018 09:12:01 +0000 (14:42 +0530)
committerMurali-P <murali.p@huawei.com>
Thu, 8 Mar 2018 09:13:23 +0000 (14:43 +0530)
Code coverage is less than 50%

Issue-ID: VNFSDK-159

Change-Id: Icf972fbc3754c3bfd495e5786fea53fbdf9c3fd5
Signed-off-by: Murali-P <murali.p@huawei.com>
vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/FileUtil.java

index a5ca6ac..073bb3e 100644 (file)
@@ -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();