Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use telnet debug, but perform not the same as rpc ,due to JSON.json() #6523

Closed
liangwenzhang opened this issue Jul 27, 2020 · 2 comments
Closed

Comments

@liangwenzhang
Copy link

liangwenzhang commented Jul 27, 2020

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.

  1. obj need to have getter and setter.
    com.alibaba.dubbo.common.bytecode.Wrapper#makeWrapper
    property with only getter will discard.

  2. 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?

@guohao
Copy link
Contributor

guohao commented Aug 18, 2020

try test-with-dubbo-admin

@CrazyHZM
Copy link
Member

No feedback for a long time, please close the issue temporarily. If there is still a problem, you can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants