From 87b95ff61ad526e4ccd0dc6524f7a389b7e36b57 Mon Sep 17 00:00:00 2001 From: liuyaochen Date: Mon, 13 Aug 2018 19:22:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0=E6=98=AFnu?= =?UTF-8?q?ll=E8=BF=94=E5=9B=9Enull=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dubbo/remoting/telnet/support/TelnetHandlerAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/TelnetHandlerAdapter.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/TelnetHandlerAdapter.java index 580238b0338..e65e634da5e 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/TelnetHandlerAdapter.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/TelnetHandlerAdapter.java @@ -56,7 +56,11 @@ public String telnet(Channel channel, String message) throws RemotingException { } buf.append(result); } catch (Throwable t) { - buf.append(t.getMessage()); + if (t instanceof NullPointerException) { + buf.append("Parameters can't be null"); + }else { + buf.append(t.getMessage()); + } } } else { buf.append("Unsupported command: ");