-
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
feature: StateHandlerInterceptor and StateRouterInterceptor support SPI #2584
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2584 +/- ##
=============================================
- Coverage 51.19% 51.04% -0.15%
+ Complexity 2806 2804 -2
=============================================
Files 554 554
Lines 17774 17774
Branches 2101 2072 -29
=============================================
- Hits 9099 9073 -26
- Misses 7817 7818 +1
- Partials 858 883 +25 |
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
Codecov Report
@@ Coverage Diff @@
## develop #2584 +/- ##
==========================================
Coverage 50.18% 50.18%
- Complexity 2919 2921 +2
==========================================
Files 578 578
Lines 18724 18724
Branches 2253 2252 -1
==========================================
Hits 9396 9396
Misses 8396 8396
Partials 932 932
|
@Override | ||
public void addInterceptor(StateHandlerInterceptor interceptor) { | ||
if (interceptors != null && !interceptors.contains(interceptor)) { | ||
interceptors.add(interceptor); |
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.
Whether need to sort the interceptor?
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.
Sorting has been done in EnhancedServiceLoader.findAllExtensionDefinition method
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
Ⅰ. Describe what this PR did
Optimize: Saga StateHandlerInterceptor and StateRouterInterceptor support SPI
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
see seata/test/src/test/resources/META-INF/services