Skip to content

Commit 6dcd593

Browse files
qq925716471carryxyh
authored andcommitted
add no-argument constructor method to URL.java fix #3342 (#3350)
* Fix NullPointerException when Hessian instantiate URL with JavaDeserializer
1 parent a6d55fa commit 6dcd593

File tree

1 file changed

+4
-0
lines changed
  • dubbo-compatible/src/main/java/com/alibaba/dubbo/common

1 file changed

+4
-0
lines changed

dubbo-compatible/src/main/java/com/alibaba/dubbo/common/URL.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
@Deprecated
2828
public class URL extends org.apache.dubbo.common.URL {
2929

30+
protected URL() {
31+
super();
32+
}
33+
3034
public URL(org.apache.dubbo.common.URL url) {
3135
super(url.getProtocol(), url.getUsername(), url.getPassword(), url.getHost(), url.getPort(), url.getPath(), url.getParameters());
3236
}

0 commit comments

Comments
 (0)