From 6dcd5938c30cb3994f08c3ea93089473234500ca Mon Sep 17 00:00:00 2001 From: IORI <925716471@qq.com> Date: Fri, 25 Jan 2019 18:29:48 +0800 Subject: [PATCH] add no-argument constructor method to URL.java fix #3342 (#3350) * Fix NullPointerException when Hessian instantiate URL with JavaDeserializer --- .../src/main/java/com/alibaba/dubbo/common/URL.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java index 255481f82a1..42bab293018 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java @@ -27,6 +27,10 @@ @Deprecated public class URL extends org.apache.dubbo.common.URL { + protected URL() { + super(); + } + public URL(org.apache.dubbo.common.URL url) { super(url.getProtocol(), url.getUsername(), url.getPassword(), url.getHost(), url.getPort(), url.getPath(), url.getParameters()); }