Merge pull request #14232 from jaymode/class_set_binding
properly bind ClassSet extensions as singletons
This commit is contained in:
commit
8f490f527a
|
@ -191,7 +191,8 @@ public abstract class ExtensionPoint {
|
|||
protected final void bindExtensions(Binder binder) {
|
||||
Multibinder<T> allocationMultibinder = Multibinder.newSetBinder(binder, extensionClass);
|
||||
for (Class<? extends T> clazz : extensions) {
|
||||
allocationMultibinder.addBinding().to(clazz).asEagerSingleton();
|
||||
binder.bind(clazz).asEagerSingleton();
|
||||
allocationMultibinder.addBinding().to(clazz);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue