dubbo-go-hessian2 icon indicating copy to clipboard operation
dubbo-go-hessian2 copied to clipboard

handle typed nil pointers in encode

Open yumosx opened this issue 2 months ago • 3 comments

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 avatar Nov 17 '25 05:11 yumosx

@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)
	}

wongoo avatar Nov 18 '25 02:11 wongoo

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. image

yumosx avatar Nov 18 '25 03:11 yumosx

@wongoo @AlexStocks The CI failure issue has been fully resolved by https://github.com/apache/dubbo-go-hessian2/pull/387

yumosx avatar Dec 09 '25 09:12 yumosx