You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2019/10/19 07:18:14 UTC
[dubbo-go-hessian2] branch v1.3.0 updated: remove worrying comments
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch v1.3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git
The following commit(s) were added to refs/heads/v1.3.0 by this push:
new e2859e7 remove worrying comments
new 0ef010e Merge pull request #137 from wongoo/v1.3.0
e2859e7 is described below
commit e2859e7c9c6d2a8414444330a0ea446a9a6296c4
Author: wongoo <ge...@163.com>
AuthorDate: Sat Oct 19 15:10:44 2019 +0800
remove worrying comments
---
int.go | 1 -
long.go | 1 -
request.go | 5 -----
response.go | 5 -----
string.go | 1 -
5 files changed, 13 deletions(-)
diff --git a/int.go b/int.go
index fd97dce..9d21568 100644
--- a/int.go
+++ b/int.go
@@ -35,7 +35,6 @@ import (
// ::= [x80-xbf] # -x10 to x3f
// ::= [xc0-xcf] b0 # -x800 to x7ff
// ::= [xd0-xd7] b1 b0 # -x40000 to x3ffff
-// hessian-lite/src/main/java/com/alibaba/com/alibaba/com/caucho/hessian/io/Hessian2Output.java:642 WriteInt
func encInt32(b []byte, v int32) []byte {
if int32(INT_DIRECT_MIN) <= v && v <= int32(INT_DIRECT_MAX) {
return encByte(b, byte(v+int32(BC_INT_ZERO)))
diff --git a/long.go b/long.go
index df8cb98..d8d2005 100644
--- a/long.go
+++ b/long.go
@@ -36,7 +36,6 @@ import (
// ::= [xf0-xff] b0 # -x800 to x7ff
// ::= [x38-x3f] b1 b0 # -x40000 to x3ffff
// ::= x59 b3 b2 b1 b0 # 32-bit integer cast to long
-// hessian-lite/src/main/java/com/alibaba/com/alibaba/com/caucho/hessian/io/Hessian2Output.java:642 WriteLong
func encInt64(b []byte, v int64) []byte {
if int64(LONG_DIRECT_MIN) <= v && v <= int64(LONG_DIRECT_MAX) {
return encByte(b, byte(v+int64(BC_LONG_ZERO)))
diff --git a/request.go b/request.go
index 117ca16..146f961 100644
--- a/request.go
+++ b/request.go
@@ -33,7 +33,6 @@ import (
// dubbo
/////////////////////////////////////////
-// com.alibaba.dubbo.common.utils.ReflectUtils.ReflectUtils.java line245 getDesc
func getArgType(v interface{}) string {
if v == nil {
return "V"
@@ -172,8 +171,6 @@ func EnsureRequest(body interface{}) *Request {
return NewRequest(body, nil)
}
-// dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
-// v2.5.4 line 204 encodeRequest
func packRequest(service Service, header DubboHeader, req interface{}) ([]byte, error) {
var (
err error
@@ -213,7 +210,6 @@ func packRequest(service Service, header DubboHeader, req interface{}) ([]byte,
encoder := NewEncoder()
encoder.Append(byteArray[:HEADER_LENGTH])
- // com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.DubboCodec.java line144 encodeRequestData
//////////////////////////////////////////
// body
//////////////////////////////////////////
@@ -222,7 +218,6 @@ func packRequest(service Service, header DubboHeader, req interface{}) ([]byte,
goto END
}
- // https://github.com/apache/dubbo/blob/dubbo-2.7.1/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeChannel.java#L92
// dubbo version + path + version + method
encoder.Encode(DEFAULT_DUBBO_PROTOCOL_VERSION)
encoder.Encode(service.Path)
diff --git a/response.go b/response.go
index e93b580..4ba9e39 100644
--- a/response.go
+++ b/response.go
@@ -96,9 +96,6 @@ func packResponse(header DubboHeader, ret interface{}) ([]byte, error) {
if hb {
encoder.Encode(nil)
} else {
- // com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.DubboCodec.java
- // v2.7.1 line191 encodeResponseData
-
atta := isSupportResponseAttachment(response.Attachments[DUBBO_VERSION_KEY])
var resWithException, resValue, resNullValue int32
@@ -133,8 +130,6 @@ func packResponse(header DubboHeader, ret interface{}) ([]byte, error) {
}
}
} else {
- // com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec
- // v2.6.5 line280 encodeResponse
if response.Exception != nil { // throw error
encoder.Encode(response.Exception.Error())
} else {
diff --git a/string.go b/string.go
index abffa66..9737761 100644
--- a/string.go
+++ b/string.go
@@ -250,7 +250,6 @@ func (d *Decoder) getStringLength(tag byte) (int32, error) {
}
}
-// hessian-lite/src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Input.java : readString
func (d *Decoder) decString(flag int32) (string, error) {
var (
tag byte