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

[Dubbo-2178] Supporting Java 8 Date/Time type when serializing with Kryo #2178 #2208

Closed
wants to merge 3 commits into from

Conversation

lwenxu
Copy link

@lwenxu lwenxu commented Aug 7, 2018

What is the purpose of the change

修复 #2178 对于空构造函数的 kryo 序列化问题

Brief changelog

写了一个 kryo 的拓展类,增强 kryo 序列化能力

Verifying this change

包含单元测试,测试全部通过

Way

由于 kryo 工具在作对象序列化的时候会调用到对象的默认构造方法,但是对于 LocalDateTime 这一类的类没有默认构造方法导致序列化失败。
对 kryo 的序列化类进行拓展,对于这一些特殊类,在它无法找到对应的序列化器,可以使用反射工厂生成对应的默认构造函数。

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a GITHUB_issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn clean install -DskipTests & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
  • If this contribution is large, please follow the Software Donation Guide.

@chickenlj chickenlj added the type/need-triage Need maintainers to triage label Aug 9, 2018
@chickenlj
Copy link
Contributor

Kryo has internal support for java 8 timer types. I think we don't need to make it so complex.

@chickenlj chickenlj closed this Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/need-triage Need maintainers to triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants