Comments (2)
这个主要是因为T extends Serializable
这样写之后,data字段的类型就是java.io.Serializable
,在读取data字段的值的时候,就是通过readObject(in, java.io.Serializable.class)
最终就会执行到Hessian2Input#readObject(Class expectedClass, Class<?>... expectedTypes)中
case 'H': {
// 最终获取的是ObjectDeserializer
Deserializer reader = findSerializerFactory().getDeserializer(expectedClass);
boolean keyValuePair = expectedTypes != null && expectedTypes.length == 2;
// ObjectDeserializer并没有实现readMap,所以最终调用的AbstractDeserializer#readMap,该方法最终都会抛出错误
return reader.readMap(this
, keyValuePair ? expectedTypes[0] : null
, keyValuePair ? expectedTypes[1] : null);
}
我不懂的是为啥这里是reader.readMap而不是reader.readObject,如果是readObject的话这个问题应该就不存在了
我觉得这应该是hessian2的bug
from dubbo-hessian-lite.
如果不设计文件传输的场景,建议用其他的序列化方式把
from dubbo-hessian-lite.
Related Issues (20)
- add back dubbo-hessian-lite 3.2.6 code
- Issue about IdentityIntMap of null Key HOT 1
- com.alibaba.com.caucho.hessian.io.HessianInput.readObject()不管什么类型读取出来的都是list HOT 1
- 接口参数如果Map的key 是NULL会被替换成0
- 3.2.9 could not found in maven central repo
- wrong generic type for decoding HOT 1
- Apache Dubbo中Hessian2协议存在远程代码执行漏洞
- LocalDateTime support from hessian-lite see a big drop on performance compared to Date type. HOT 1
- hessian can NOT initial org.springframework.data.domain.Pageable correctly
- The startup test reported an error. HOT 2
- org.bson.types.ObjectId序列化以及反序列化问题 HOT 18
- Dubbo 3.0.4 java.util.List反序列化失败 HOT 2
- Hessian2Input _sbuf memory leak HOT 5
- 不支持jdk17吗?
- put a length param into this createList method so that the collection will not resize
- I have upgraded the latest version. How to verify whether the cve-2022-39198 deserialization vulnerability still exists
- 属性反序列化解析失败 HessianFieldException
- rpc返回结果用Stream.collect(Collectors.toList())可以正常返回,用Stream.toList()返回会报错 HOT 1
- InaccessibleObjectException was found on jdk 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dubbo-hessian-lite.