You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/08/04 06:17:33 UTC

[GitHub] [dubbo-go-hessian2] xc19950304 opened a new issue #215: dubbogo-hessian2 can not unmarshal the object while it contains too many map-object which are initialized as nil

xc19950304 opened a new issue #215:
URL: https://github.com/apache/dubbo-go-hessian2/issues/215


   本地测试发现,当对象包含多个map对象时(>=2),有两个及以上被初始化为nil时,无法反序列化,且报错“decInstance->decMapByValue field name: cookies2: illegal ref index“(eg:使用dubbogo序列化后再反序列化)
   '
   type Circular struct {
   	Num      int
   	Previous *Circular
   	Next     *Circular
   	ResponseDataBytes    []byte
   	Cookies             map[string]string
   	Headers            map[string]string
   	Cookies2             map[string]string
   	LoginResponseSession map[string]string
   }
   
   func (Circular) JavaClassName() string {
   	return "com.company.Circular"
   }
   
   func main() {
   	c := &Circular{}
   	c.Num = 12345
   	c.Previous = c
   	c.Next = c
   	c.Cookies = map[string]string{}
   	c.Headers = nil
   	c.Cookies2 =  map[string]string{}
   	c.LoginResponseSession = nil
   
   	e := hessian.NewEncoder()
   	err := e.Encode(c)
   	if err != nil {
   		panic(err)
   	}
   
   	bytes := e.Buffer()
   
   	decoder := hessian.NewDecoder(bytes)
   
   	decode, err := decoder.Decode()
   
   	if err != nil {
   		panic(err)
   	}
   
   	fmt.Println(decode)
   }
   '


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on issue #215: dubbogo-hessian2 can not unmarshal the object while it contains too many map-object which are initialized as nil

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #215:
URL: https://github.com/apache/dubbo-go-hessian2/issues/215#issuecomment-669752795


   @xc19950304 the issue have been fixed on master, pls try and test.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] AlexStocks closed issue #215: dubbogo-hessian2 can not unmarshal the object while it contains too many map-object which are initialized as nil

Posted by GitBox <gi...@apache.org>.
AlexStocks closed issue #215:
URL: https://github.com/apache/dubbo-go-hessian2/issues/215


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on issue #215: dubbogo-hessian2 can not unmarshal the object while it contains too many map-object which are initialized as nil

Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #215:
URL: https://github.com/apache/dubbo-go-hessian2/issues/215#issuecomment-669640938


   this issue will be fixed by https://github.com/apache/dubbo-go-hessian2/pull/216


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org