-
Notifications
You must be signed in to change notification settings - Fork 641
[ISSUE #4129]Enhance the functionality of EventMeshExtensionFactory #4131
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4131 +/- ##
============================================
+ Coverage 16.93% 16.95% +0.02%
- Complexity 1410 1411 +1
============================================
Files 588 588
Lines 25739 25751 +12
Branches 2387 2390 +3
============================================
+ Hits 4358 4366 +8
- Misses 20946 20948 +2
- Partials 435 437 +2
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
What is the intent and purpose of this pr? @mxsm |
@xwm1992 When I use utility class loading Because the key in the file is mysql. Will throw
So this problem is solved by this PR |
| private static <T> T getSingletonExtension(Class<T> extensionClass, EventMeshSPI spi, String extensionInstanceName) { | ||
| return (T) EXTENSION_INSTANCE_CACHE.computeIfAbsent(new Extension(spi, extensionInstanceName), name -> { |
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.
@xwm1992 The main purpose of this PR is to change the cache key from String to an Extension class specified with its SPI annotation, in order to support two extensions loading in one module.
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.
This review is a comment.


Fixes #4129
Motivation
Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.
Modifications
Documentation