-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
使用自定义类型数组参数报错: argument type mismatch #1019
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@EvenLjj 该问题表现的原因是使用了Object的Deserializer来反序列化Id,希望能提供一些背景/上下文:为何Interface的反序列化器要使用Deserializer而非Deserializer? |
Describe the bug
RPC服务的方法中,参数使用自定义类型数组时(且自定义类型是接口interface),客户端调用后报错:
argument type mismatch
。Expected behavior
希望可以使用任何类型的数组作为参数。比如有
interface Id
,可使用Id[]
作为方法参数。Actual behavior
服务端调用业务方法时,Object[]无法转换为Id[]而报错:
更多记录信息可参考:https://blog.csdn.net/javeme/article/details/113802090
Steps to reproduce
Minimal yet complete reproducer code (or GitHub URL to code)
Environment
java -version
): 8uname -a
): MacThe text was updated successfully, but these errors were encountered: