Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #616 from eclipse/cd_issue_608
Browse files Browse the repository at this point in the history
[#608] Fixed reuse issue with WrappingInjectorProvider
  • Loading branch information
cdietrich authored Jan 16, 2018
2 parents 2184d4d + 4f10ab7 commit b43b008
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ public WrappingInjectorProvider(IInjectorProvider delegate) {
this.delegate = delegate;
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
this.injector = createInjector();
if (delegate instanceof IRegistryConfigurator) {
((IRegistryConfigurator) delegate).setupRegistry();
}
registerFactory(injector);
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
if (delegate instanceof IRegistryConfigurator) {
((IRegistryConfigurator) delegate).restoreRegistry();
}
}

private void registerFactory(Injector injector) {
Expand Down

0 comments on commit b43b008

Please sign in to comment.