From: Ben Soares Date: Tue, 8 Jan 2019 23:22:10 +0000 (+0000) Subject: JAL-3141 Made some more suggested changes from code review X-Git-Tag: Release_2_11_0~17^2~97^2~39 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7ffbd8cdfcf79249cf16df75c55ed3930e584a4b;p=jalview.git JAL-3141 Made some more suggested changes from code review --- diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index 28eefd6..c58a714 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -8,6 +8,7 @@ import jalview.util.MessageManager; import java.io.File; import java.io.IOException; import java.util.Arrays; +import java.util.Map; import java.util.HashMap; import java.util.TreeMap; @@ -263,7 +264,7 @@ public class BackupFiles // sort the backup files (based on integer found in the suffix) using a // precomputed Hashmap for speed - HashMap bfHashMap = new HashMap<>(); + Map bfHashMap = new HashMap<>(); for (int i = 0; i < backupFiles.length; i++) { File f = backupFiles[i]; @@ -465,7 +466,7 @@ public class BackupFiles return rename; } - public static TreeMap lsBackupFilesAsTreeMap( + public static TreeMap getBackupFilesAsTreeMap( String fileName, String suffix, int digits) { @@ -504,7 +505,7 @@ public class BackupFiles // sort the backup files (based on integer found in the suffix) using a // precomputed Hashmap for speed - HashMap bfHashMap = new HashMap<>(); + Map bfHashMap = new HashMap<>(); for (int i = 0; i < backupFiles.length; i++) { File f = backupFiles[i]; @@ -518,10 +519,10 @@ public class BackupFiles return bfTreeMap; } - public static File[] lsBackupFiles(String fileName, String suffix, + public static File[] getBackupFiles(String fileName, String suffix, int digits) { - TreeMap bfTreeMap = lsBackupFilesAsTreeMap(fileName, + TreeMap bfTreeMap = getBackupFilesAsTreeMap(fileName, suffix, digits); File[] backupFiles = new File[bfTreeMap.size()]; bfTreeMap.values().toArray(backupFiles);