summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main/java/org/onap
diff options
context:
space:
mode:
authorAvinashS <avinash.s@huawei.com>2017-10-16 12:36:29 +0530
committerAvinashS <avinash.s@huawei.com>2017-10-16 12:36:29 +0530
commit4dfdbee2c1d34f0f6584d624a213fc44389cd430 (patch)
tree3ee5b38b35e3c5654c36378bbc52a35117379360 /csarvalidation/src/main/java/org/onap
parent0cd1abfbaf9ab74d294be36d863d6813f0243489 (diff)
Fix sonar critical
Change-Id: Ibdcda7db910e343dba0b5f5e6da7a0db201eee0e IssueId: VNFSDK-113 Signed-off-by: AvinashS <avinash.s@huawei.com>
Diffstat (limited to 'csarvalidation/src/main/java/org/onap')
-rw-r--r--csarvalidation/src/main/java/org/onap/validation/csar/CsarUtil.java2
-rw-r--r--csarvalidation/src/main/java/org/onap/validation/csar/CsarValidator.java6
-rw-r--r--csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/CsarUtil.java b/csarvalidation/src/main/java/org/onap/validation/csar/CsarUtil.java
index 850ccdd..c498479 100644
--- a/csarvalidation/src/main/java/org/onap/validation/csar/CsarUtil.java
+++ b/csarvalidation/src/main/java/org/onap/validation/csar/CsarUtil.java
@@ -135,7 +135,7 @@ public class CsarUtil {
outputStream.close();
}
} catch (Exception e1) {
- logger.error("FILE_IO" + ":" + "close OutputStream error! " +ErrorCodes.FILE_IO);
+ logger.error("FILE_IO" + ":" + "close OutputStream error! " +ErrorCodes.FILE_IO, e1);
throw new ValidationException(ErrorCodes.FILE_IO);
}
diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/CsarValidator.java b/csarvalidation/src/main/java/org/onap/validation/csar/CsarValidator.java
index 24969e7..9ca9c26 100644
--- a/csarvalidation/src/main/java/org/onap/validation/csar/CsarValidator.java
+++ b/csarvalidation/src/main/java/org/onap/validation/csar/CsarValidator.java
@@ -52,7 +52,7 @@ public class CsarValidator {
try(FileInputStream is = new FileInputStream(csarWithPath)) {
} catch (FileNotFoundException e2) {
- LOG.error("CSAR %s is not found! " +ErrorCodes.RESOURCE_MISSING);
+ LOG.error("CSAR %s is not found! " +ErrorCodes.RESOURCE_MISSING, e2);
throw new ValidationException(ErrorCodes.RESOURCE_MISSING);
}
@@ -153,7 +153,7 @@ public class CsarValidator {
return true;
}
} catch (IOException e2) {
- LOG.error("CSAR_META_VALIDATION" + ":" + "Exception caught while validateCsarMeta ! " +ErrorCodes.FILE_IO);
+ LOG.error("CSAR_META_VALIDATION" + ":" + "Exception caught while validateCsarMeta ! " +ErrorCodes.FILE_IO, e2);
throw new ValidationException(ErrorCodes.FILE_IO);
}
}
@@ -198,7 +198,7 @@ public class CsarValidator {
}
}
} catch (IOException | NullPointerException e) {
- LOG.error("CSAR_TOSCA_VALIDATION" + ":" + "Could not read file %s ! " +ErrorCodes.FILE_IO+ " " +ErrorCodes.RESOURCE_MISSING);
+ LOG.error("CSAR_TOSCA_VALIDATION" + ":" + "Could not read file %s ! " +ErrorCodes.FILE_IO+ " " +ErrorCodes.RESOURCE_MISSING, e);
throw new ValidationException(ErrorCodes.RESOURCE_MISSING);
}
return false;
diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java b/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java
index 5a3230b..ec0c45c 100644
--- a/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java
+++ b/csarvalidation/src/main/java/org/onap/validation/csar/ValidationException.java
@@ -54,7 +54,7 @@ public class ValidationException extends RuntimeException {
}
private ErrorCodes errorCode;
- private final Map<String,Object> properties = new TreeMap<String,Object>();
+ private final transient Map<String,Object> properties = new TreeMap<String,Object>();
public ValidationException(ErrorCodes fileIo) {
this.errorCode = fileIo;