Skip to content

Commit

Permalink
[ISSUE #3269]Fix load plugin failure (#3270)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Feb 26, 2023
1 parent 987378d commit 64d9cd9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public static JarExtensionClassLoader getInstance() {

@Override
public <T> Map<String, Class<?>> loadExtensionClass(Class<T> extensionType, String extensionInstanceName) {
return extensionClassCache.computeIfAbsent(extensionType, t -> doLoadExtensionClass(t, extensionInstanceName));
return extensionClassCache.computeIfAbsent(extensionType, t -> doLoadExtensionClass(t));
}

private <T> Map<String, Class<?>> doLoadExtensionClass(Class<T> extensionType, String extensionInstanceName) {
private <T> Map<String, Class<?>> doLoadExtensionClass(Class<T> extensionType) {
Map<String, Class<?>> extensionMap = new HashMap<>(16);
EventMeshSPI eventMeshSpiAnnotation = extensionType.getAnnotation(EventMeshSPI.class);

String pluginDir = Paths.get(EVENTMESH_EXTENSION_PLUGIN_DIR, eventMeshSpiAnnotation.eventMeshExtensionType().getExtensionTypeName(),
extensionInstanceName).toString();
String pluginDir = Paths.get(EVENTMESH_EXTENSION_PLUGIN_DIR, eventMeshSpiAnnotation.eventMeshExtensionType().getExtensionTypeName())
.toString();

String extensionFileName = EventMeshExtensionConstant.EVENTMESH_EXTENSION_META_DIR + extensionType.getName();
EventMeshUrlClassLoader urlClassLoader = EventMeshUrlClassLoader.getInstance();
Expand Down

0 comments on commit 64d9cd9

Please sign in to comment.