From 0b0e6623b173dc97bd62fe9d5d41066362cc8464 Mon Sep 17 00:00:00 2001 From: Murali-P Date: Wed, 15 Feb 2017 18:03:33 +0530 Subject: Remove un-used code Resolved:VNFSDK-21 VNF SDK Function test Change-Id: If976c74f88dae3efd3f1f37c767bf94b1b3415f1 Signed-off-by: Murali-P --- .../exception/VnfSdkFuncTestException.java | 51 ---------------------- .../openo/vnfsdk/functest/util/ZipCompressor.java | 39 ----------------- 2 files changed, 90 deletions(-) delete mode 100644 vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java (limited to 'vnf-sdk-function-test/src/main') diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java deleted file mode 100644 index af2a612..0000000 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/exception/VnfSdkFuncTestException.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2017 Huawei Technologies Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openo.vnfsdk.functest.exception; - -public class VnfSdkFuncTestException extends Exception { - - private static final long serialVersionUID = 1L; - - private String errorCode; - - private String errorMsg; - - public String getErrorCode() { - return errorCode; - } - - public void setErrorCode(String errorCode) { - this.errorCode = errorCode; - } - - public String getErrorMsg() { - return errorMsg; - } - - public void setErrorMsg(String errorMsg) { - this.errorMsg = errorMsg; - } - - public VnfSdkFuncTestException() { - super(); - } - - public VnfSdkFuncTestException(String errorCode, String errorMsg) { - this.errorCode = errorCode; - this.errorMsg = errorMsg; - } -} diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java index 885a97a..02a0609 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/util/ZipCompressor.java @@ -42,45 +42,6 @@ public class ZipCompressor { zipFile = new File(pathName); } - /** - * compress file according several path. - * - * @param pathName file path name - * @throws Exception - */ - public void compress(String... pathName) { - ZipOutputStream out = null; - FileOutputStream fileOutputStream = null; - CheckedOutputStream cos = null; - try { - fileOutputStream = new FileOutputStream(zipFile); - cos = new CheckedOutputStream(fileOutputStream, new CRC32()); - out = new ZipOutputStream(cos); - String basedir = ""; - for(int i = 0; i < pathName.length; i++) { - compress(new File(pathName[i]), out, basedir); - } - - } catch(FileNotFoundException e1) { - try { - throw new FileNotFoundException("Failed to find file: "); - } catch(FileNotFoundException e) { - LOG.error("compress: ", e); - } - } finally { - try { - if(out != null) - out.close(); - if(fileOutputStream != null) - fileOutputStream.close(); - if(cos != null) - cos.close(); - } catch(Exception e1) { - LOG.error("Error while closing stream: ", e1); - } - } - } - /** * compress file according file path. * -- cgit 1.2.3-korg