Repository: apache/dubbo-go-hessian2 (go)

Issue:
Decode List happend ”illegal class index @idx 1“ error
我遇到了和 #119 相同的错误，dubbo 的数据包如下：

```golang
var dubboData = []byte{
	0xda, 0xbb, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x07, 0x6e, 0x05, 0x32, 0x2e, 0x30, 0x2e, 0x32, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x05, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x08, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x73, 0x10, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2f, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x3b, 0x72, 0x13, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x41, 0x72, 0x72, 0x61, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x1b, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x52, 0x4c, 0x98, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x07, 0x7a, 0x6f, 0x6e, 0x65, 0x4b, 0x65, 0x79, 0x04, 0x70, 0x61, 0x74, 0x68, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x60, 0x4d, 0x30, 0x25, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x75, 0x74, 0x69, 0x6c, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x24, 0x55, 0x6e, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x70, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x67, 0x7a, 0x30, 0x31, 0x0a, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x01, 0x30, 0x05, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x05, 0x32, 0x2e, 0x30, 0x2e, 0x32, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x4e, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x01, 0x30, 0x0b, 0x6d, 0x61, 0x78, 0x2e, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x72, 0x7a, 0x30, 0x31, 0x09, 0x6d, 0x61, 0x78, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x01, 0x30, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x0d, 0x31, 0x35, 0x39, 0x38, 0x39, 0x33, 0x38, 0x37, 0x33, 0x32, 0x33, 0x32, 0x38, 0x04, 0x73, 0x69, 0x64, 0x65, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x0b, 0x6d, 0x69, 0x6e, 0x2e, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x01, 0x30, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x0e, 0x6d, 0x61, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x01, 0x30, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x4e, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x01, 0x30, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x4e, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x4e, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x0d, 0x31, 0x30, 0x2e, 0x34, 0x39, 0x2e, 0x33, 0x33, 0x2e, 0x31, 0x32, 0x3a, 0x30, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x01, 0x30, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x01, 0x30, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x01, 0x30, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x4e, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x4e, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x4e, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x4e, 0x0a, 0x6d, 0x61, 0x78, 0x2e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x01, 0x30, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x4e, 0x5a, 0x4e, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x2f, 0x6e, 0x75, 0x6c, 0x6c, 0x90, 0x0b, 0x31, 0x30, 0x2e, 0x34, 0x39, 0x2e, 0x33, 0x33, 0x2e, 0x31, 0x32, 0x4e, 0x4e, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x60, 0x4d, 0x91, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x67, 0x7a, 0x30, 0x31, 0x0a, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x01, 0x30, 0x05, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x05, 0x32, 0x2e, 0x30, 0x2e, 0x32, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x30, 0x30, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6d, 0x61, 0x6c, 0x6c, 0x2e, 0x71, 0x75, 0x61, 0x73, 0x61, 0x72, 0x2e, 0x64, 0x73, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x07, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x01, 0x30, 0x0b, 0x6d, 0x61, 0x78, 0x2e, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x72, 0x7a, 0x30, 0x31, 0x09, 0x6d, 0x61, 0x78, 0x2e, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x01, 0x30, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x00, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x0d, 0x31, 0x35, 0x39, 0x38, 0x39, 0x33, 0x38, 0x37, 0x33, 0x32, 0x33, 0x32, 0x38, 0x04, 0x73, 0x69, 0x64, 0x65, 0x08, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x06, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x0b, 0x6d, 0x69, 0x6e, 0x2e, 0x65, 0x6c, 0x61, 0x70, 0x73, 0x65, 0x64, 0x01, 0x30, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x01, 0x30, 0x14, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x05, 0x67, 0x7a, 0x30, 0x31, 0x61, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x00, 0x0e, 0x6d, 0x61, 0x78, 0x2e, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x01, 0x30, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x01, 0x30, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x14, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x14, 0x7a, 0x6f, 0x6e, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x0f, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x3a, 0x32, 0x30, 0x38, 0x38, 0x31, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x0d, 0x31, 0x30, 0x2e, 0x34, 0x39, 0x2e, 0x33, 0x33, 0x2e, 0x31, 0x32, 0x3a, 0x30, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x01, 0x30, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x01, 0x30, 0x07, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x01, 0x30, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x11, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x70, 0x72, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x05, 0x67, 0x7a, 0x30, 0x31, 0x61, 0x11, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x70, 0x72, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x0a, 0x6d, 0x61, 0x78, 0x2e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x01, 0x30, 0x0f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x04, 0x74, 0x72, 0x75, 0x65, 0x5a, 0x4e, 0x30, 0x37, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x6d, 0x61, 0x6c, 0x6c, 0x2e, 0x71, 0x75, 0x61, 0x73, 0x61, 0x72, 0x2e, 0x64, 0x73, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x90, 0x0b, 0x31, 0x30, 0x2e, 0x34, 0x39, 0x2e, 0x33, 0x33, 0x2e, 0x31, 0x32, 0x4e, 0x4e, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x67, 0x7a, 0x30, 0x31, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x70, 0x72, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x05, 0x67, 0x7a, 0x30, 0x31, 0x61, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x05, 0x30, 0x2e, 0x30, 0x2e, 0x30, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x7a, 0x6f, 0x6e, 0x65, 0x04, 0x67, 0x7a, 0x30, 0x31, 0x04, 0x70, 0x61, 0x74, 0x68, 0x30, 0x27, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x64, 0x75, 0x62, 0x62, 0x6f, 0x2e, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x07, 0x61, 0x70, 0x70, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x14, 0x7a, 0x6f, 0x6e, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2d, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x0a, 0x64, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x4e, 0x0d, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x04, 0x67, 0x7a, 0x30, 0x31, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x0b, 0x31, 0x30, 0x2e, 0x34, 0x39, 0x2e, 0x33, 0x33, 0x2e, 0x31, 0x32, 0x0c, 0x64, 0x6d, 0x61, 0x6c, 0x6c, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x4e, 0x5a,
}
```

使用 `hessian.NewDecoderWithSkip` 来 Decode，只是需要解析 `attachment`, 但是解析中间的 args 的时候出现了错误
`illegal class index @idx 1`

通过追踪代码发现，解析 List 第一个内容的时候没有问题，解析第二内容的时候在执行[这里](https://github.com/apache/dubbo-go-hessian2/blob/ef54e1110ecb3346c87f333dab1a758c692c8855/map.go#L248)的时候发现 `classInfoList` 里面只有一个 class 列表，所以抛出了上面的异常


Pull request description:
Fix decoding error for map in map

**What this PR does**:
Fix decoding error for map in map

**Which issue(s) this PR fixes**:

Fixes #223

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:
```release-note
- Fix decoding error for map in map. 
```

Patch:
diff --git a/encode.go b/encode.go
index 2ae6791..ad9d5c6 100644
--- a/encode.go
+++ b/encode.go
@@ -61,13 +61,13 @@ func (e *Encoder) Append(buf []byte) {
 // Encode If @v can not be encoded, the return value is nil. At present only struct may can not be encoded.
 func (e *Encoder) Encode(v interface{}) error {
 	if v == nil {
-		e.buffer = EncNull(e.buffer)
+		e.buffer = encNull(e.buffer)
 		return nil
 	}
 
 	switch val := v.(type) {
 	case nil:
-		e.buffer = EncNull(e.buffer)
+		e.buffer = encNull(e.buffer)
 		return nil
 
 	case bool:
@@ -105,7 +105,7 @@ func (e *Encoder) Encode(v interface{}) error {
 
 	case time.Time:
 		if ZeroDate == val {
-			e.buffer = EncNull(e.buffer)
+			e.buffer = encNull(e.buffer)
 		} else {
 			e.buffer = encDateInMs(e.buffer, &val)
 			// e.buffer = encDateInMimute(v.(time.Time), e.buffer)
@@ -138,7 +138,7 @@ func (e *Encoder) Encode(v interface{}) error {
 			vv := reflect.ValueOf(v)
 			vv = UnpackPtr(vv)
 			if !vv.IsValid() {
-				e.buffer = EncNull(e.buffer)
+				e.buffer = encNull(e.buffer)
 				return nil
 			}
 			if vv.Type().String() == "time.Time" {
diff --git a/int.go b/int.go
index 0581170..5263a3f 100644
--- a/int.go
+++ b/int.go
@@ -110,7 +110,7 @@ func (d *Decoder) decInt32(flag int32) (int32, error) {
 func (d *Encoder) encTypeInt32(b []byte, p interface{}) ([]byte, error) {
 	value := reflect.ValueOf(p)
 	if PackPtr(value).IsNil() {
-		return EncNull(b), nil
+		return encNull(b), nil
 	}
 	value = UnpackPtrValue(value)
 	if value.Kind() != reflect.Int32 {
diff --git a/map.go b/map.go
index feec8fa..efe70e7 100644
--- a/map.go
+++ b/map.go
@@ -113,14 +113,14 @@ func (e *Encoder) encMap(m interface{}) error {
 	value = UnpackPtrValue(value)
 	// check nil map
 	if value.Kind() == reflect.Ptr && !value.Elem().IsValid() {
-		e.buffer = EncNull(e.buffer)
+		e.buffer = encNull(e.buffer)
 		return nil
 	}
 
 	keys = value.MapKeys()
 	if len(keys) == 0 {
 		// fix: set nil for empty map
-		e.buffer = EncNull(e.buffer)
+		e.buffer = encNull(e.buffer)
 		return nil
 	}
 
@@ -268,9 +268,13 @@ func (d *Decoder) decMap(flag int32) (interface{}, error) {
 				if !ok {
 					return nil, perrors.Errorf("the type of map key must be string, but get %v", k)
 				}
-				fieldValue = instValue.FieldByName(fieldName)
-				if fieldValue.IsValid() {
-					fieldValue.Set(EnsureRawValue(v))
+				if instValue.Kind() == reflect.Map {
+					instValue.SetMapIndex(reflect.ValueOf(k), EnsureRawValue(v))
+				} else {
+					fieldValue = instValue.FieldByName(fieldName)
+					if fieldValue.IsValid() {
+						fieldValue.Set(EnsureRawValue(v))
+					}
 				}
 			}
 			_, err = d.readByte()
@@ -280,6 +284,9 @@ func (d *Decoder) decMap(flag int32) (interface{}, error) {
 			return inst, nil
 		} else {
 			m = make(map[interface{}]interface{})
+			classIndex := RegisterPOJOMapping(t, m)
+			d.appendClsDef(pojoRegistry.classInfoList[classIndex])
+
 			d.appendRefs(m)
 			for d.peekByte() != BC_END {
 				k, err = d.Decode()
diff --git a/null.go b/null.go
index 8d74d1b..0b1fd7f 100644
--- a/null.go
+++ b/null.go
@@ -20,6 +20,6 @@ package hessian
 /////////////////////////////////////////
 // Null
 /////////////////////////////////////////
-func EncNull(b []byte) []byte {
+func encNull(b []byte) []byte {
 	return append(b, BC_NULL)
 }
diff --git a/object.go b/object.go
index dcd8130..9148dfa 100644
--- a/object.go
+++ b/object.go
@@ -117,7 +117,7 @@ func (e *Encoder) encObject(v POJO) error {
 	vv = UnpackPtr(vv)
 	// check nil pointer
 	if !vv.IsValid() {
-		e.buffer = EncNull(e.buffer)
+		e.buffer = encNull(e.buffer)
 		return nil
 	}
 
diff --git a/pojo.go b/pojo.go
index bf11633..e8eed50 100644
--- a/pojo.go
+++ b/pojo.go
@@ -115,17 +115,22 @@ func showPOJORegistry() {
 
 // RegisterPOJO Register a POJO instance. The return value is -1 if @o has been registered.
 func RegisterPOJO(o POJO) int {
+	return RegisterPOJOMapping(o.JavaClassName(), o)
+}
+
+// RegisterPOJOMapping Register a POJO instance. The return value is -1 if @o has been registered.
+func RegisterPOJOMapping(javaClassName string, o interface{}) int {
 	// # definition for an object (compact map)
 	// class-def  ::= 'C' string int string*
 	pojoRegistry.Lock()
 	defer pojoRegistry.Unlock()
 
-	if goName, ok := pojoRegistry.j2g[o.JavaClassName()]; ok {
+	if goName, ok := pojoRegistry.j2g[javaClassName]; ok {
 		return pojoRegistry.registry[goName].index
 	}
 
 	// JavaClassName shouldn't equal to goName
-	if _, ok := pojoRegistry.registry[o.JavaClassName()]; ok {
+	if _, ok := pojoRegistry.registry[javaClassName]; ok {
 		return -1
 	}
 
@@ -140,7 +145,7 @@ func RegisterPOJO(o POJO) int {
 	structInfo.typ = obtainValueType(o)
 
 	structInfo.goName = structInfo.typ.String()
-	structInfo.javaName = o.JavaClassName()
+	structInfo.javaName = javaClassName
 	structInfo.inst = o
 	pojoRegistry.j2g[structInfo.javaName] = structInfo.goName
 	registerTypeName(structInfo.goName, structInfo.javaName)
@@ -149,37 +154,37 @@ func RegisterPOJO(o POJO) int {
 	nextStruct := []reflect.Type{structInfo.typ}
 	for len(nextStruct) > 0 {
 		current := nextStruct[0]
-
-		for i := 0; i < current.NumField(); i++ {
-
-			// skip unexported anonymous filed
-			if current.Field(i).PkgPath != "" {
-				continue
-			}
-
-			structField := current.Field(i)
-
-			// skip ignored field
-			tagVal, hasTag := structField.Tag.Lookup(tagIdentifier)
-			if tagVal == `-` {
-				continue
+		if current.Kind() == reflect.Struct {
+			for i := 0; i < current.NumField(); i++ {
+				// skip unexported anonymous filed
+				if current.Field(i).PkgPath != "" {
+					continue
+				}
+
+				structField := current.Field(i)
+
+				// skip ignored field
+				tagVal, hasTag := structField.Tag.Lookup(tagIdentifier)
+				if tagVal == `-` {
+					continue
+				}
+
+				// flat anonymous field
+				if structField.Anonymous && structField.Type.Kind() == reflect.Struct {
+					nextStruct = append(nextStruct, structField.Type)
+					continue
+				}
+
+				var fieldName string
+				if hasTag {
+					fieldName = tagVal
+				} else {
+					fieldName = lowerCamelCase(structField.Name)
+				}
+
+				fieldList = append(fieldList, fieldName)
+				bBody = encString(bBody, fieldName)
 			}
-
-			// flat anonymous field
-			if structField.Anonymous && structField.Type.Kind() == reflect.Struct {
-				nextStruct = append(nextStruct, structField.Type)
-				continue
-			}
-
-			var fieldName string
-			if hasTag {
-				fieldName = tagVal
-			} else {
-				fieldName = lowerCamelCase(structField.Name)
-			}
-
-			fieldList = append(fieldList, fieldName)
-			bBody = encString(bBody, fieldName)
 		}
 
 		nextStruct = nextStruct[1:]
@@ -206,8 +211,8 @@ func RegisterPOJO(o POJO) int {
 	return structInfo.index
 }
 
-// UnRegisterPOJOs unregister POJO instances. It is easy for test.
-func UnRegisterPOJOs(os ...POJO) []int {
+// easy for test
+func unRegisterPOJOs(os ...POJO) []int {
 	arr := make([]int, len(os))
 	for i := range os {
 		arr[i] = unRegisterPOJO(os[i])
@@ -235,7 +240,7 @@ func unRegisterPOJO(o POJO) int {
 	return -1
 }
 
-func obtainValueType(o POJO) reflect.Type {
+func obtainValueType(o interface{}) reflect.Type {
 	v := reflect.ValueOf(o)
 	switch v.Kind() {
 	case reflect.Struct:
@@ -385,6 +390,10 @@ func createInstance(goName string) interface{} {
 		return nil
 	}
 
+	if s.typ.Kind() == reflect.Map {
+		return reflect.MakeMap(s.typ).Interface()
+	}
+
 	return reflect.New(s.typ).Interface()
 }
 
diff --git a/response.go b/response.go
index 68f7c6b..ea7408f 100644
--- a/response.go
+++ b/response.go
@@ -140,7 +140,7 @@ func packResponse(header DubboHeader, ret interface{}) ([]byte, error) {
 	}
 
 	byteArray = encoder.Buffer()
-	byteArray = EncNull(byteArray) // if not, "java client" will throw exception  "unexpected end of file"
+	byteArray = encNull(byteArray) // if not, "java client" will throw exception  "unexpected end of file"
 	pkgLen := len(byteArray)
 	if pkgLen > int(DEFAULT_LEN) { // 8M
 		return nil, perrors.Errorf("Data length %d too large, max payload %d", pkgLen, DEFAULT_LEN)


Test patch:
diff --git a/hessian_test.go b/hessian_test.go
index b712838..47726a2 100644
--- a/hessian_test.go
+++ b/hessian_test.go
@@ -199,7 +199,7 @@ func TestHessianCodec_ReadAttachments(t *testing.T) {
 	}
 	resp, err := doTestHessianEncodeHeader(t, PackageResponse, Response_OK, body)
 	assert.NoError(t, err)
-	UnRegisterPOJOs(&CaseB{}, &CaseA{})
+	unRegisterPOJOs(&CaseB{}, &CaseA{})
 	codecR1 := NewHessianCodec(bufio.NewReader(bytes.NewReader(resp)))
 	codecR2 := NewHessianCodec(bufio.NewReader(bytes.NewReader(resp)))
 	h := &DubboHeader{}
diff --git a/map_test.go b/map_test.go
index e349f7b..b63827d 100644
--- a/map_test.go
+++ b/map_test.go
@@ -96,3 +96,14 @@ func TestMapEncode(t *testing.T) {
 	testJavaDecode(t, "argUntypedMap_1", map[interface{}]interface{}{"a": int32(0)})
 	testJavaDecode(t, "argUntypedMap_2", map[interface{}]interface{}{int32(0): "a", int32(1): "b"})
 }
+
+func TestCustomMap(t *testing.T) {
+	testDecodeFramework(t, "customReplyMap", map[interface{}]interface{}{"a": int32(1), "b": int32(2)})
+
+	mapInMap := map[interface{}]interface{}{
+		"obj1": map[interface{}]interface{}{"a": int32(1)},
+		"obj2": map[interface{}]interface{}{"b": int32(2)},
+	}
+	testDecodeFramework(t, "customReplyMapInMap", mapInMap)
+	testDecodeFramework(t, "customReplyMapInMapJsonObject", mapInMap)
+}
diff --git a/test_hessian/pom.xml b/test_hessian/pom.xml
index acd9188..a4db3f1 100644
--- a/test_hessian/pom.xml
+++ b/test_hessian/pom.xml
@@ -47,6 +47,11 @@
             <artifactId>dubbo</artifactId>
             <version>2.6.5</version>
         </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.70</version>
+        </dependency>
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
diff --git a/test_hessian/src/main/java/test/TestCustomReply.java b/test_hessian/src/main/java/test/TestCustomReply.java
index 12fc411..62e3ea6 100644
--- a/test_hessian/src/main/java/test/TestCustomReply.java
+++ b/test_hessian/src/main/java/test/TestCustomReply.java
@@ -18,8 +18,12 @@
 package test;
 
 import com.alibaba.com.caucho.hessian.io.Hessian2Output;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.caucho.hessian.test.A0;
 import com.caucho.hessian.test.A1;
+import test.model.DateDemo;
+
 import java.io.OutputStream;
 import java.io.Serializable;
 import java.math.BigDecimal;
@@ -27,17 +31,16 @@ import java.math.BigInteger;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
-import test.model.DateDemo;
-
 
 public class TestCustomReply {
 
     private Hessian2Output output;
     private HashMap<Class<?>, String> typeMap;
 
-    TestCustomReply(OutputStream os) {
+    public TestCustomReply(OutputStream os) {
         output = new Hessian2Output(os);
 
         typeMap = new HashMap<>();
@@ -355,32 +358,32 @@ public class TestCustomReply {
     }
 
     public void customReplyTypedFixedList_BigInteger() throws Exception {
-        BigInteger[] integers = new BigInteger[] { 
-            new BigInteger("1234"), 
-            new BigInteger("12347890"), 
-            new BigInteger("123478901234"), 
-            new BigInteger("1234789012345678"), 
-            new BigInteger("123478901234567890"), 
-            new BigInteger("1234789012345678901234"), 
-            new BigInteger("12347890123456789012345678"), 
-            new BigInteger("123478901234567890123456781234"), 
-            new BigInteger("1234789012345678901234567812345678"), 
-            new BigInteger("12347890123456789012345678123456781234"), 
-            new BigInteger("-12347890123456789012345678123456781234"), 
-            new BigInteger("0"), 
+        BigInteger[] integers = new BigInteger[]{
+                new BigInteger("1234"),
+                new BigInteger("12347890"),
+                new BigInteger("123478901234"),
+                new BigInteger("1234789012345678"),
+                new BigInteger("123478901234567890"),
+                new BigInteger("1234789012345678901234"),
+                new BigInteger("12347890123456789012345678"),
+                new BigInteger("123478901234567890123456781234"),
+                new BigInteger("1234789012345678901234567812345678"),
+                new BigInteger("12347890123456789012345678123456781234"),
+                new BigInteger("-12347890123456789012345678123456781234"),
+                new BigInteger("0"),
         };
         output.writeObject(integers);
         output.flush();
     }
 
     public void customReplyTypedFixedList_CustomObject() throws Exception {
-        Object[] objects = new Object[] {
-            new BigInteger("1234"),
-            new BigInteger("-12347890"),
-            new BigInteger("0"),
-            new BigDecimal("123.4"),
-            new BigDecimal("-123.45"),
-            new BigDecimal("0"),
+        Object[] objects = new Object[]{
+                new BigInteger("1234"),
+                new BigInteger("-12347890"),
+                new BigInteger("0"),
+                new BigDecimal("123.4"),
+                new BigDecimal("-123.45"),
+                new BigDecimal("0"),
         };
         output.writeObject(objects);
         output.flush();
@@ -473,6 +476,37 @@ public class TestCustomReply {
         output.writeObject(set);
         output.flush();
     }
+
+    public void customReplyMap() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>(4);
+        map.put("a", 1);
+        map.put("b", 2);
+        output.writeObject(map);
+        output.flush();
+    }
+
+    public Map<String, Object> mapInMap() throws Exception {
+        Map<String, Object> map1 = new HashMap<String, Object>();
+        map1.put("a", 1);
+        Map<String, Object> map2 = new HashMap<String, Object>();
+        map2.put("b", 2);
+
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("obj1", map1);
+        map.put("obj2", map2);
+        return map;
+    }
+
+    public void customReplyMapInMap() throws Exception {
+        output.writeObject(mapInMap());
+        output.flush();
+    }
+
+    public void customReplyMapInMapJsonObject() throws Exception {
+        JSONObject json = JSON.parseObject(JSON.toJSONString(mapInMap()));
+        output.writeObject(json);
+        output.flush();
+    }
 }
 
 interface Leg {