Aias00 opened a new issue, #6729:
URL: https://github.com/apache/shenyu/issues/6729
- Severity: Medium
- Location:
`shenyu-spi/src/main/java/org/apache/shenyu/spi/ExtensionLoader.java:102-107`
(`putIfAbsent` keeps first loader), `:78` (classloader stored at construction),
`:268-271` (`loadDirectory` calls `classLoader.getResources` only on pinned
loader)
-
Description:
`getExtensionLoader(clazz, cl)` caches `ExtensionLoader` by `Class<?>` only.
`putIfAbsent` keeps the first loader (typically app classloader).
`loadDirectory` calls `classLoader.getResources("META-INF/shenyu/<iface>")` on
that pinned loader. A later call with a plugin `ClassLoader` returns the cached
app-classloader loader, so the plugin's `META-INF/shenyu/...` SPI files are
never enumerated.
-
Impact:
Plugin-contributed SPI extensions silently don't load; `getJoin(name)`
throws `IllegalArgumentException` at runtime for the contributed name. The SPI
subsystem cannot be extended by hot-deployed plugins.
-
Suggested fix:
Enumerate resources across all registered classloaders (merge results,
last-wins or error-on-dup), or key `LOADERS` by `(clazz, classLoader)`.
-
Confidence: Medium
- Related existing: none
---
_Identified during the 2026-08-02 deep re-scan; full list in
[`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]