wongoo commented on a change in pull request #179:
URL: https://github.com/apache/dubbo-go-hessian2/pull/179#discussion_r411028219
##########
File path: object.go
##########
@@ -375,11 +375,15 @@ func (d *Decoder) decInstance(typ reflect.Type, cls
classInfo) (interface{}, err
for i := 0; i < len(cls.fieldNameList); i++ {
fieldName := cls.fieldNameList[i]
- index, fieldStruct, err := findField(fieldName, typ)
+ index, fieldStruct, err := findFieldWithCache(fieldName, typ)
if err != nil {
return nil, perrors.Errorf("can not find field %s",
fieldName)
}
+ if fieldStruct == nil {
Review comment:
the fieldStruct won't be nil if err is nil, this check is redundant.
And should it return error when fieldStruct is nil?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]