[ISSUE #4129]Enhance the functionality of EventMeshExtensionFactory#4131
[ISSUE #4129]Enhance the functionality of EventMeshExtensionFactory#4131mxsm merged 1 commit intoapache:masterfrom
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.
@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.


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