Closed u0x01 closed 5 years ago
A good suggestion. @wongoo so what is your opinion?
@AlexStocks it's good absolutely. I used to worry about it may not able to ref to the same of object when exists ref, but it won't happen. @u0x01 please submit a PR for it. Thanks!
@u0x01 it's an improvement, not a bug.
already merge pr.
https://github.com/dubbogo/hessian2/blob/57ac2e777dc6d853bdcf74b5c697b6a98a728be9/object.go#L305 https://github.com/dubbogo/hessian2/blob/57ac2e777dc6d853bdcf74b5c697b6a98a728be9/object.go#L440 that lines should return
vRef.Interface()
of value itself insteadvRef
of reflect.value.Its effect user decoding what he want, eg: I registered a POJO named
MyUser
, when I decode a hessian should return aMyUser
type struct to me, but I must doing type assertion twice now for getting type ofMyUser
:Its should using like this for normal user: