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

数组上调用toString() #185

Closed
QiAnXinCodeSafe opened this issue Dec 29, 2020 · 1 comment
Closed

数组上调用toString() #185

QiAnXinCodeSafe opened this issue Dec 29, 2020 · 1 comment

Comments

@QiAnXinCodeSafe
Copy link

QiAnXinCodeSafe commented Dec 29, 2020

直接使用method拼接,默认调用toString方法
数组类中toString进行重写,仅仅是重载为类的静态方法。所以数组直接调用toString方法的结果并不是数组中元素的值,而是[数组的类型@内存地址哈希码]

throw new UnsupportedOperationException("不允许 method = " + parser.getMethod() + " 的请求调用远程函数 " + fb.getMethod() + " ! 必须满足 method 在 " + methods + "内 !");

可以手工拼接或者使用Java工具类Arrays中的toString方法转化数组为字符串。

@TommyLemon
Copy link
Collaborator

TommyLemon commented Dec 29, 2020

这里是当时写错了,感谢反馈

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

No branches or pull requests

2 participants