-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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: support jdk9+ compile code #4410
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #4410 +/- ##
=============================================
- Coverage 48.86% 48.84% -0.03%
- Complexity 4182 4183 +1
=============================================
Files 793 794 +1
Lines 28039 28054 +15
Branches 3426 3426
=============================================
+ Hits 13701 13702 +1
- Misses 12901 12911 +10
- Partials 1437 1441 +4
|
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.
No problem on implementation function, but why not consider using instance classes to wrap it.
包装类改动的代码范围会比较广,工具类相对比较通用 |
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
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
* @param buffer byteBuffer | ||
*/ | ||
public static void flip(Buffer buffer) { | ||
buffer.flip(); |
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.
返回类型,是不是应该return一下?没准其他哪里会用到。
下面的方法也看一下吧。
Ⅰ. Describe what this PR did
使用jdk9及以上版本编译seata源码后在jdk8中进行引入,再默认序列化下,会出现
java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer)
需要将ByteBuffer转换为Buffer再调用相关函数
Ⅱ. Does this pull request fix one issue?
fixes #1410 #2223
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews