diff options
-rwxr-xr-x | dblib/README.md | 2 | ||||
-rw-r--r-- | sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java | 18 |
2 files changed, 3 insertions, 17 deletions
diff --git a/dblib/README.md b/dblib/README.md index 98e8f0c6f..ab2c5130e 100755 --- a/dblib/README.md +++ b/dblib/README.md @@ -3,4 +3,4 @@ DBLIB Utility DBLIB utility is designed as a high availability connection manager. It is configured to use multiple databases, and based on the configured rules -always provide the connection to te active database. +always provide the connection to the active database. diff --git a/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java b/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java index 772906e59..ac3dbd2a9 100644 --- a/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java +++ b/sli/recording/src/main/java/org/onap/ccsdk/sli/core/sli/recording/FileRecorder.java @@ -82,7 +82,6 @@ public class FileRecorder implements SvcLogicRecorder { } File recordFile = new File(fileName); - FileWriter fileWriter = null; Date now = new Date(); TimeZone tz = TimeZone.getTimeZone("UTC"); @@ -93,8 +92,8 @@ public class FileRecorder implements SvcLogicRecorder { record = record.replaceFirst("__TIMESTAMP__", dateFmt.format(now)); } - try ( PrintWriter recPrinter = new PrintWriter(fileWriter = new - FileWriter(recordFile, true))) + try ( FileWriter fileWriter = new FileWriter(recordFile, true); + PrintWriter recPrinter = new PrintWriter(fileWriter)) { recPrinter.println(record); } @@ -102,19 +101,6 @@ public class FileRecorder implements SvcLogicRecorder { { throw new SvcLogicException("Cannot write record to file", e); } - finally - { - if (fileWriter != null) - { - try { - fileWriter.close(); - } catch (IOException e) { - - } - } - } - - } } |