From 075c802fada1793e28f4180ebe30eab56618c7d5 Mon Sep 17 00:00:00 2001 From: hecy7 Date: Fri, 8 Sep 2023 14:05:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E6=B3=A8=E8=A7=A3@Overri?= =?UTF-8?q?de=E8=A1=A5=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hecy7 --- .../com/taobao/arthas/core/command/monitor200/ThreadSampler.java | 1 + 1 file changed, 1 insertion(+) 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); From bd2bb36205cc6f231ca5367d5362296611c48e29 Mon Sep 17 00:00:00 2001 From: hecy7 Date: Mon, 11 Dec 2023 11:28:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=99=A8=E4=BC=9A?= =?UTF-8?q?=E5=81=9A=E7=B1=BB=E5=9E=8B=E6=8E=A8=E6=96=AD=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E9=9C=80=E6=98=BE=E7=A4=BA=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hecy7 --- core/src/main/java/com/taobao/arthas/core/util/FileUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;