From 8c7afb823eb8af28ca54ebfcb120304ab75af037 Mon Sep 17 00:00:00 2001 From: fornaix Date: Mon, 28 Dec 2020 17:01:12 +0800 Subject: [PATCH] fix NullPointerException in MBeanView. #1644 (#1645) --- .../java/com/taobao/arthas/core/command/view/MBeanView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/taobao/arthas/core/command/view/MBeanView.java b/core/src/main/java/com/taobao/arthas/core/command/view/MBeanView.java index 87349036a..af7feb83c 100644 --- a/core/src/main/java/com/taobao/arthas/core/command/view/MBeanView.java +++ b/core/src/main/java/com/taobao/arthas/core/command/view/MBeanView.java @@ -204,7 +204,7 @@ public class MBeanView extends ResultView { table.row(new LabelElement(title).style(Decoration.bold.fg(Color.yellow))); for (String fieldName : fieldNames) { Object fieldValue = descriptor.getFieldValue(fieldName); - table.row(fieldName, fieldValue.toString()); + table.row(fieldName, fieldValue == null ? "" : fieldValue.toString()); } } }