in java_collection.go [93:114]
func (d *Decoder) decodeCollection(length int, listTyp string) (interface{}, error) {
typ := getCollectionSerialize(listTyp)
if typ == nil {
return nil, perrors.New("no collection deserialize set as " + listTyp)
}
v := reflect.New(typ).Interface()
collcetionV, ok := v.(JavaCollectionObject)
if !ok {
return nil, perrors.New("collection deserialize err " + listTyp)
}
list, err := d.readTypedListValue(length, "", false)
if err != nil {
return nil, err
}
listInterface := EnsureRawAny(list)
listV, listOk := listInterface.([]interface{})
if !listOk {
return nil, perrors.New("collection deserialize err " + listTyp)
}
collcetionV.Set(listV)
return collcetionV, nil
}