-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Decoder failed to decode int8/int16 type values of map field in struct #366
Conversation
…Map with int8/int16 as key or value type
map_test.go
Outdated
if err != nil { | ||
t.Errorf("Decode() = %+v", err) | ||
} | ||
t.Logf("decode(%v) = %v, %v\n", obj, res, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should check whether the decode value is equal to the original
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## master #366 +/- ##
==========================================
+ Coverage 68.98% 69.23% +0.24%
==========================================
Files 28 28
Lines 3140 3146 +6
==========================================
+ Hits 2166 2178 +12
+ Misses 751 745 -6
Partials 223 223
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does:
Fix Decoder failed to decode int8/int16 type values of map field in struct
Which issue(s) this PR fixes:
Currently, dubbo-go-hessian2 is unable to correctly decode values of type
int8
/int16
that are contained within amap
type field in a struct, resulting in a panic during the decoding process.This PR is intended to fix this issue, which will enhance the compatibility between dubbo-go and dubbo-java.
Special notes for your reviewer:
I am a developer of the Kitex framework, and currently, DubboCodec is utilizing dubbo-go-hessian2 as its encoder/decoder. We also hope to resolve this issue through this PR, enabling us to support decoding of
int8
andint16
types.Does this PR introduce a user-facing change?: