EsotericSoftware / EsotericSoftware/kryo
Add pattern-based whitelisting feature
- Dominant language
- HTML
- Stars
- 6.5k
- Forks
- 841
- Avg merge
- 39m
- Merged PRs (30d)
- 4
Description
**Is your feature request related to a problem? Please describe.**
As of today, we have to register each and every class if we want to allow it for serialization/deserialization if kryo.setRegistrationRequired(true) is set. But this is a bit costlier in terms of code e.g.: lets' say we have 100's of classes we want to register in a package, then we have to register each and every class.
Something like this we want to achieve [https://github.com/x-stream/xstream/blob/20f26bcecc2256e032b1073cef52f14a8ef44d56/xstream/src/java/com/thoughtworks/xstream/XStream.java#L2323](https://github.com/x-stream/xstream/blob/20f26bcecc2256e032b1073cef52f14a8ef44d56/xstream/src/java/com/thoughtworks/xstream/XStream.java#L2323)
**Describe the solution you'd like**
We have to extend DefaultClassResolver and override getRegistartion method. But this method doesn't work if kryo.setRegistrationRequired(true) is set and only we have to be kryo.setRegistrationRequired(false)
and filter each and every class.
Contributor guide
Assessment
This issue has not been assessed yet.