未验证 提交 3a518603 编写于 作者: L Liang Zhang 提交者: GitHub

Avoid register more times for SPI (#5618)

上级 42496af5
......@@ -44,6 +44,9 @@ public final class ShardingSphereServiceLoader {
* @param <T> type of service
*/
public static <T> void register(final Class<T> service) {
if (SERVICE_MAP.containsKey(service)) {
return;
}
for (T each : ServiceLoader.load(service)) {
registerServiceClass(service, each);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册