-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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: fix StringUtils StackOverflowError #3828
bugfix: fix StringUtils StackOverflowError #3828
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3828 +/- ##
=============================================
+ Coverage 40.67% 40.91% +0.23%
- Complexity 2965 2985 +20
=============================================
Files 664 665 +1
Lines 22418 22465 +47
Branches 2781 2794 +13
=============================================
+ Hits 9118 9191 +73
+ Misses 12453 12427 -26
Partials 847 847
|
如果caller是toString无参方法,则直接忽略? |
这个类本身就无法实例化, 另外,针对 |
另外,关于循环引用的问题,目前还是存在的,如果不是引用在第一层,而是嵌套了多层的话。 |
@jsbxyyx done, 一级循环引用,以及多级循环引用,都已解决。 |
*/ | ||
private static Object getObjectUniqueCode(Object obj) { | ||
return System.identityHashCode(obj); | ||
} |
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.
Object getUniqueSubstituteObject(Object obj)
方法,用来代替obj保存到Set中,避免obj.hashCode()
方法,在obj
为Collection
或Map
且存在循环引用时,直接抛出StackOverflowError
异常。
我的问题 |
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
common/src/main/java/io/seata/common/util/CycleDependencyHandler.java
Outdated
Show resolved
Hide resolved
common/src/main/java/io/seata/common/util/CycleDependencyHandler.java
Outdated
Show resolved
Hide resolved
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, 请补充一下md文件
done |
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
bugfix: fix StringUtils StackOverflowError.
fixed: #3826