Skip to content
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

bugfix: ByteBuffer allocates a fixed length, which may cause BufferOverflowException #1344

Merged
merged 7 commits into from
Aug 8, 2019

Conversation

slievrly
Copy link
Member

Signed-off-by: slievrly slievrly@163.com

Ⅰ. Describe what this PR did

bugfix: ByteBuffer allocates a fixed length, which may cause BufferOverflowException

Ⅱ. Does this pull request fix one issue?

fix #1336

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

…OverflowException

Signed-off-by: slievrly <slievrly@163.com>
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Signed-off-by: slievrly <slievrly@163.com>
@codecov-io
Copy link

codecov-io commented Jul 26, 2019

Codecov Report

Merging #1344 into develop will decrease coverage by 0.36%.
The diff coverage is 60.91%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1344      +/-   ##
=============================================
- Coverage      45.88%   45.51%   -0.37%     
+ Complexity      1672     1661      -11     
=============================================
  Files            345      345              
  Lines          12670    12665       -5     
  Branches        1598     1598              
=============================================
- Hits            5813     5764      -49     
- Misses          6201     6251      +50     
+ Partials         656      650       -6
Impacted Files Coverage Δ Complexity Δ
...l/transaction/AbstractTransactionRequestCodec.java 50% <ø> (ø) 1 <0> (ø) ⬇️
...java/io/seata/codec/seata/MessageCodecFactory.java 64.13% <0%> (-24.14%) 60 <0> (-10)
...ol/transaction/AbstractGlobalEndResponseCodec.java 90.9% <100%> (ø) 3 <0> (ø) ⬇️
...tocol/transaction/BranchRegisterResponseCodec.java 90.9% <100%> (ø) 3 <0> (ø) ⬇️
.../transaction/AbstractTransactionResponseCodec.java 90.9% <100%> (ø) 3 <0> (ø) ⬇️
...src/main/java/io/seata/codec/seata/SeataCodec.java 80% <100%> (-0.65%) 3 <0> (ø)
...a/codec/seata/protocol/RegisterRMRequestCodec.java 52.45% <25%> (ø) 3 <1> (ø) ⬇️
...c/seata/protocol/AbstractIdentifyRequestCodec.java 61.11% <47.61%> (ø) 4 <2> (ø) ⬇️
...col/transaction/AbstractBranchEndRequestCodec.java 57.74% <50%> (ø) 3 <2> (ø) ⬇️
.../seata/protocol/AbstractIdentifyResponseCodec.java 60% <50%> (ø) 3 <2> (ø) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1dd65b7...ffa73d6. Read the comment docs.

Signed-off-by: slievrly <slievrly@163.com>
Copy link
Contributor

@sharajava sharajava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getByteBuffer() should be removed later.

@slievrly slievrly merged commit 421e9ea into apache:develop Aug 8, 2019
@wangliang181230 wangliang181230 added this to the 0.8.1 milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.nio.BufferOverflowException: null java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
6 participants