dubbo-go-hessian2
dubbo-go-hessian2 copied to clipboard
handle typed nil pointers in encode
What this PR does:
Which issue(s) this PR fixes:
Fixes https://github.com/apache/dubbo-go/issues/2517
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
handle typed nil pointers such as (*int32)(nil) by encoding them as hessian null
@yumosx unit test TestMultipleLevelRecursiveDep2 failed, u can update the test and re-run the CI to check the reason:
decoded := fmt.Sprintf("%v", obj)
origin := fmt.Sprintf("%v", data)
if decoded != origin {
t.Errorf("deserialize mismatched, origin: %s, decoded: %s", origin, decoded)
}
Hi @wongoo,thanks for your review, this test seems correct. The CI failure was caused by another reason I will create a PR to fix it later.
@wongoo @AlexStocks The CI failure issue has been fully resolved by https://github.com/apache/dubbo-go-hessian2/pull/387