aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/backend')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManager.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManager.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManager.java
index f16467f568..663801bd8e 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManager.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/security/SecurityManager.java
@@ -233,10 +233,12 @@ public class SecurityManager {
}
private void deleteFile(final Path filePath) {
- try {
- Files.delete(filePath);
- } catch (final IOException e) {
- LOGGER.warn("Failed to delete '{}' after verifying package signed data", filePath, e);
+ if (Files.exists(filePath)) {
+ try {
+ Files.delete(filePath);
+ } catch (final IOException e) {
+ LOGGER.warn("Failed to delete '{}' after verifying package signed data", filePath, e);
+ }
}
}