fangxueshun opened a new issue, #10911:
URL: https://github.com/apache/dubbo/issues/10911
### Environment
* Dubbo version: 2.7.15
* Operating System version: mac,linux
* Java version: 1.8.0_29
### Steps to reproduce this issue
1. 客户端发起泛化调用,使用map包装参数,给出
2. 消费端反序列化时,会提示强转失败
3. ClassCastException: xxx cannot be cast to xxx
这个问题在版本2.7.0中时不存在的,经过初步定位是因为2.7.15中更新了org.apache.dubbo.common.utils.PojoUtils#realize(java.lang.Object[],
java.lang.Class<?>[], java.lang.reflect.Type[])方法的实现导致。
问题复现
` public static void main(String[] args) {
Object[] objects = new Object[1];
Map<String,Object> map = new HashMap<>();
map.put("name", "名称");
map.put("class", TestDemo.class.getName());
objects[0] = map;
Object[] realize = PojoUtils.realize(objects, new Class[]
{TestDemo.class},
new Class[] {TestDemo.class});
System.out.println(realize[0].getClass().getName());
}`
2.7.15输出:java.util.HashMap
2.7.0输出:xxx.TestDemo
相关代码
2.7.15中的实现

2.7.0的实现

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]