From 64d9cd986daf7dda24e9d1080c5ceb6c17a23369 Mon Sep 17 00:00:00 2001 From: mxsm Date: Sun, 26 Feb 2023 09:44:37 +0800 Subject: [PATCH] [ISSUE #3269]Fix load plugin failure (#3270) --- .../eventmesh/spi/loader/JarExtensionClassLoader.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java b/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java index 858350217b..8afe6b7c82 100644 --- a/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java +++ b/eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java @@ -66,15 +66,15 @@ public static JarExtensionClassLoader getInstance() { @Override public Map> loadExtensionClass(Class extensionType, String extensionInstanceName) { - return extensionClassCache.computeIfAbsent(extensionType, t -> doLoadExtensionClass(t, extensionInstanceName)); + return extensionClassCache.computeIfAbsent(extensionType, t -> doLoadExtensionClass(t)); } - private Map> doLoadExtensionClass(Class extensionType, String extensionInstanceName) { + private Map> doLoadExtensionClass(Class extensionType) { Map> 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();