From 8e9c0653dd6c6862123c9609ae34e1206d86456e Mon Sep 17 00:00:00 2001 From: talig Date: Wed, 20 Dec 2017 14:30:43 +0200 Subject: Add collaboration feature Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig --- .../org/openecomp/sdc/ci/tests/utils/general/FileUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'asdc-tests/src/main/java/org') diff --git a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileUtils.java b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileUtils.java index b07a3c3d7b..5acb0e47c1 100644 --- a/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileUtils.java +++ b/asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileUtils.java @@ -39,13 +39,13 @@ import org.slf4j.LoggerFactory; import fj.data.Either; public class FileUtils { - static Logger logger = LoggerFactory.getLogger(Utils.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(Utils.class.getName()); public static void writeToFile(String filePath, String content) { try { Files.write(Paths.get(filePath), content.getBytes()); } catch (IOException e) { - e.printStackTrace(); + LOGGER.debug(String.format("Failed to write to file '%s'", filePath), e); } } @@ -76,7 +76,7 @@ public class FileUtils { File file = new File(testResourcesPath); File[] listFiles = file.listFiles(); if (listFiles != null) { - List listFileName = new ArrayList(); + List listFileName = new ArrayList<>(); for (File newFile : listFiles) { if (newFile.isFile()) { listFileName.add(newFile.getPath()); @@ -100,7 +100,7 @@ public class FileUtils { public static String loadPayloadFileFromListUsingPosition(List listFileName, String pattern, Boolean isBase64, int positionInList) throws IOException { - List newList = new ArrayList(Arrays.asList(listFileName.get(positionInList))); + List newList = new ArrayList<>(Arrays.asList(listFileName.get(positionInList))); return loadPayloadFile(newList, pattern, isBase64); } @@ -109,7 +109,7 @@ public class FileUtils { String fileName; String payload = null; fileName = FileUtils.getFilePathFromListByPattern(listFileName, pattern); - logger.debug("fileName: {}",fileName); + LOGGER.debug("fileName: {}",fileName); if (fileName != null) { payload = Decoder.readFileToString(fileName); -- cgit 1.2.3-korg