when I debug dubbo use telnet ,it perform not the same as the rpc result. In the result json, some properties are missing.....
telnet use com.alibaba.dubbo.common.json.JSON#json(java.lang.Object) to serialize result to json.
there are two problems use this method to convert to json.
-
obj need to have getter and setter.
com.alibaba.dubbo.common.bytecode.Wrapper#makeWrapper
property with only getter will discard.
-
if setter return self, like use lombok accessor chain. SETTER_METHOD_DESC_PATTERN does not match the setter method.
public static final Pattern SETTER_METHOD_DESC_PATTERN = Pattern.compile("set([A-Z][_a-zA-Z0-9]*)\((" + DESC_REGEX + ")\)V");
I wonder if this could be improved or if there are some other ways to debug the dubbo?