Skip to content

Commit

Permalink
fix: delegate non-spring beans instantiation to super method (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis authored Mar 4, 2021
1 parent 6c13e7a commit fac154d
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.vaadin.flow.di.Lookup;
import com.vaadin.flow.di.LookupInitializer;
import com.vaadin.flow.function.VaadinApplicationInitializationBootstrap;
import com.vaadin.flow.internal.ReflectTools;
import com.vaadin.flow.server.VaadinContext;
import com.vaadin.flow.server.VaadinServletContext;

Expand Down Expand Up @@ -179,10 +178,8 @@ private <T> T instantiate(WebApplicationContext context,
// implementation classes found in classpath are ignored if there
// are beans which are subclasses of these impl classes
return null;
} else if (ResourceProviderImpl.class.equals(impl)) {
return serviceClass.cast(new ResourceProviderImpl());
} else {
return serviceClass.cast(ReflectTools.createInstance(impl));
return instantiate(serviceClass, impl);
}
}

Expand Down

0 comments on commit fac154d

Please sign in to comment.