From 99513a2fe89e0e342b31329fc8767af55945567b Mon Sep 17 00:00:00 2001 From: nkorange Date: Fri, 15 Mar 2019 15:36:17 +0800 Subject: [PATCH] #502 Support NONE healthChecker deserialize --- .../com/alibaba/nacos/naming/healthcheck/JsonAdapter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java index 46eb8f36e..fbc245472 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java @@ -55,6 +55,10 @@ public class JsonAdapter implements ObjectDeserializer, ObjectSerializer { return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Tcp.class); } + if (StringUtils.equals(checkType, AbstractHealthChecker.None.TYPE)) { + return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.None.class); + } + if (StringUtils.equals(checkType, AbstractHealthChecker.Mysql.TYPE)) { return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Mysql.class); }