Merge pull request #137 from wongoo/v1.3.0
remove comments
diff --git a/int.go b/int.go
index fd97dce..9d21568 100644
--- a/int.go
+++ b/int.go
@@ -35,7 +35,6 @@
// ::= [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 @@
// ::= [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 @@
// 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 @@
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 @@
encoder := NewEncoder()
encoder.Append(byteArray[:HEADER_LENGTH])
- // com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.DubboCodec.java line144 encodeRequestData
//////////////////////////////////////////
// body
//////////////////////////////////////////
@@ -222,7 +218,6 @@
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 @@
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 @@
}
}
} 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 @@
}
}
-// 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