Whether or not bug
#7342
-
Beta Was this translation helpful? Give feedback.
Answered by
YongGoose
May 22, 2025
Replies: 1 comment 3 replies
-
I believe this is a design issue rather than a clear-cut bug. The actual singletons loaded via SPI are the implementations of RegistryProvider, while the RegistryService implementations are constructed through the provide method of RegistryProvider. This architecture results in a new RegistryService instance being created each time the provide method is called. Therefore, I think we first need to determine whether RegistryService should maintain singleton behavior, rather than continuing with the current multiple-instance pattern. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current implementation of
RegistryService
doesn’t override equals and hashCode.So if we use a
Set
, I think logically identical instances could end up being stored as duplicates.