swagle commented on a change in pull request #221: HDDS-2538. Fix issues found 
in DatabaseHelper.
URL: https://github.com/apache/hadoop-ozone/pull/221#discussion_r348672648
 
 

 ##########
 File path: 
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/audit/parser/common/DatabaseHelper.java
 ##########
 @@ -142,27 +156,27 @@ private static boolean insertAudits(String dbName, 
String logs) {
   }
 
   private static ArrayList<AuditEntry> parseAuditLogs(String filePath)
-      throws Exception {
-    ArrayList<AuditEntry> listResult = new ArrayList<AuditEntry>();
-    try(FileInputStream fis = new FileInputStream(filePath);
-        InputStreamReader isr = new InputStreamReader(fis, "UTF-8");
+      throws IOException {
+    ArrayList<AuditEntry> listResult = new ArrayList<>();
+    try (FileInputStream fis = new FileInputStream(filePath);
+        InputStreamReader isr = new InputStreamReader(fis, UTF_8);
         BufferedReader bReader = new BufferedReader(isr)) {
-      String currentLine = null;
-      String[] entry = null;
+      String currentLine;
+      String[] entry;
       AuditEntry tempEntry = null;
-      String nextLine = null;
+      String nextLine;
       currentLine = bReader.readLine();
       nextLine = bReader.readLine();
 
 Review comment:
   Done.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to