编译器会做类型推断,无需显示声明

Signed-off-by: hecy7 <hecy7@asiainfo.com>
pull/2757/head
hecy7 1 year ago
parent 075c802fad
commit bd2bb36205

@ -140,7 +140,7 @@ public class FileUtils {
public static List<int[]> loadCommandHistory(File file) {
BufferedReader br = null;
List<int[]> history = new ArrayList<int[]>();
List<int[]> history = new ArrayList<>();
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
String line;
@ -194,7 +194,7 @@ public class FileUtils {
public static List<String> loadCommandHistoryString(File file) {
BufferedReader br = null;
List<String> history = new ArrayList<String>();
List<String> history = new ArrayList<>();
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "utf-8"));
String line;

Loading…
Cancel
Save