Skip to content

Commit 132cfcb

Browse files
authored
Merge pull request #2 from wanjunlei/java
fix bug plugin can not be nil
2 parents d5ef370 + 367d435 commit 132cfcb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

functions-framework-invoker/src/main/java/dev/openfunction/invoker/context/RuntimeContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ private void loadPlugins(ClassLoader classLoader) {
113113
private Map<String, Plugin> loadPlugins(ClassLoader classLoader, String[] pluginNames) {
114114
Map<String, Plugin> plugins = new HashMap<>();
115115

116+
if (pluginNames == null) {
117+
return plugins;
118+
}
119+
116120
for (String name : pluginNames) {
117121
if (Objects.equals(name, TracingSkywalking)) {
118122
plugins.put(TracingSkywalking, tracingPlugin);

0 commit comments

Comments
 (0)