diff --git a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java index 91fade566d3..ee75954a7a2 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java +++ b/core/src/main/java/com/taobao/arthas/core/command/monitor200/ThreadSampler.java @@ -124,6 +124,7 @@ public int compare(ThreadVO o1, ThreadVO o2) { // Sort by CPU time : should be a rendering hint... Collections.sort(threads, new Comparator() { + @Override public int compare(ThreadVO o1, ThreadVO o2) { long l1 = deltas.get(o1); long l2 = deltas.get(o2); diff --git a/core/src/main/java/com/taobao/arthas/core/util/FileUtils.java b/core/src/main/java/com/taobao/arthas/core/util/FileUtils.java index ec046468cf2..c118a68b66f 100644 --- a/core/src/main/java/com/taobao/arthas/core/util/FileUtils.java +++ b/core/src/main/java/com/taobao/arthas/core/util/FileUtils.java @@ -140,7 +140,7 @@ public static void saveCommandHistory(List history, File file) { public static List loadCommandHistory(File file) { BufferedReader br = null; - List history = new ArrayList(); + List history = new ArrayList<>(); try { br = new BufferedReader(new InputStreamReader(new FileInputStream(file))); String line; @@ -194,7 +194,7 @@ public static void saveCommandHistoryString(List history, File file) { public static List loadCommandHistoryString(File file) { BufferedReader br = null; - List history = new ArrayList(); + List history = new ArrayList<>(); try { br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "utf-8")); String line;