From bf368d2a9cf764f22126fd59c9a3a10ab12fb4bb Mon Sep 17 00:00:00 2001 From: ToineSiebelink Date: Mon, 29 Jun 2020 12:24:38 +0100 Subject: Fix SonarQube vulnerabilities Added logging to handle file io boolean returns Added security related settings to xml factories and builders Issue-ID: POLICY-2654 Change-Id: Ibc0a01f978bfc446e1dc1f8ad952d1305a7b7178 Signed-off-by: ToineSiebelink --- .../src/main/java/org/onap/policy/apex/tools/common/OutputFile.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/tools-common') diff --git a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java index 0aa85df5d..2a20554b5 100644 --- a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java +++ b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/OutputFile.java @@ -122,7 +122,9 @@ public class OutputFile { } } else { try { - file.createNewFile(); + if (file.createNewFile()) { + LOGGER.trace("Created output file {}", file.getName()); + } } catch (final IOException e) { String message = "could not create output file: " + e.getMessage(); LOGGER.warn(message, e); -- cgit 1.2.3-korg