TeslaCN commented on PR #24558:
URL: https://github.com/apache/shardingsphere/pull/24558#issuecomment-1502685472
> If users load SPI recursively when customizing SPI, I don't think it's
users' fault (root cause).
>
> e.g.
>
> ```
> public final class OuterSPI implements TypedSPI {
>
> // TypedSPILoader depends on ShardingSphereServiceLoader
> private final InnerSPI innerSPI =
TypedSPILoader.getService(InnerSPI.class, "type");
> }
> ```
>
> Users just use classes of ShardingSphere indirectly, e.g.
`ShardingSphereServiceLoader`, but not use `ConcurrentHashMap` directly. And
`ShardingSphereServiceLoader.getServiceInstances` javadoc doesn't declare it
could not be invoked recursively.
>
> Maybe we could update javadoc of `ShardingSphereServiceLoader` and also
[Dev Manual](https://shardingsphere.apache.org/document/5.3.1/en/dev-manual/).
Got it.
--
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]