Skip to content

Commit b11f354

Browse files
committed
added ServiceConfigurationError to catch
BPE should not crash if a process plugins has a miss configured ProcessPluginDefinition that breaks the jvm service loader, but specific plugin should be ignored.
1 parent 92d3ae9 commit b11f354

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dsf-bpe/dsf-bpe-process-api/src/main/java/dev/dsf/bpe/api/plugin/AbstractProcessPluginFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.nio.file.Path;
77
import java.util.List;
88
import java.util.Objects;
9+
import java.util.ServiceConfigurationError;
910
import java.util.ServiceLoader;
1011
import java.util.ServiceLoader.Provider;
1112
import java.util.stream.Collectors;
@@ -88,7 +89,7 @@ else if (definitions.size() > 1)
8889

8990
return createProcessPlugin(definitions.get(0).get(), draft, pluginPath, pluginClassLoader);
9091
}
91-
catch (Exception e)
92+
catch (ServiceConfigurationError | Exception e)
9293
{
9394
logger.debug("Ignoring {}: Unable to load process plugin", pluginPath.toString(), e);
9495
logger.warn("Ignoring {}: Unable to load process plugin: {} - {}", pluginPath.toString(),

0 commit comments

Comments
 (0)