apache / dubbo-go-hessian2

caucho hessian2 implementation in Go for [apache/dubbo-go](https://github.com/apache/dubbo-go) which is compatible with [dubbo-hessian-lite](https://github.com/apache/dubbo-hessian-lite)
Apache License 2.0
210 stars 114 forks source link

Dubbo-go作为Provider时, RPC返回的结构体中的指针字段无法被Java正确映射为Java包装类型 #365

Open yukinomiu opened 1 year ago

yukinomiu commented 1 year ago

What happened:

Java调用Golang Provider时, Golang Provider返回的响应结构体中包含指针类型(*int64, 对应Java的java.lang.Long)字段, 客户端无法解析. 将Golang Provider响应体中的指针字段改为非指针类型, 或者改为*bool即可正常工作.

What you expected to happen:

Golang Provider响应结构体中包含的指针字段(*int32, *int64)等, 可以正确映射为Java中的包装类型.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?: dubbo-go版本: v3.1.0 dubbo-go-hessian2 v1.12.2 dubbo-spring-boot-starter: 3.2.5

tiltwind commented 1 year ago

@yukinomiu is there demo code to simulate the issue?

yukinomiu commented 1 year ago

@tiltwind I had posted the same issue in dubbo-go project: https://github.com/apache/dubbo-go/issues/2410 you can find code details in this issue.