summaryrefslogtreecommitdiffstats
path: root/asdc-tests/src/main/java
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2017-12-20 14:30:43 +0200
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2017-12-21 11:12:33 +0000
commit8e9c0653dd6c6862123c9609ae34e1206d86456e (patch)
tree5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /asdc-tests/src/main/java
parent785ebcc95de3e064e843bec04ba7a209d854fc7c (diff)
Add collaboration feature
Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'asdc-tests/src/main/java')
-rw-r--r--asdc-tests/src/main/java/org/openecomp/sdc/ci/tests/utils/general/FileUtils.java10
1 files changed, 5 insertions, 5 deletions
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<String> listFileName = new ArrayList<String>();
+ List<String> 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<String> listFileName, String pattern,
Boolean isBase64, int positionInList) throws IOException {
- List<String> newList = new ArrayList<String>(Arrays.asList(listFileName.get(positionInList)));
+ List<String> 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);