Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require bindings for Resource types #224

Merged
merged 1 commit into from
Jan 30, 2018
Merged

Conversation

yifan-coursera
Copy link
Contributor

Resource classes are dynamically injected via Injector.getInstance calls in org.coursera.naptime.router2.Router. This means that the injector does no know about the existence of resource classes and cannot eagerly instantiate singletons when running in production. This change uses AbstractModule.getBinding to inform Guice that the resource class binding is required, which allows Guice to eagerly instantiate singletons when running in production

@yifan-coursera yifan-coursera requested review from zhaojunz and dguo-coursera and removed request for zhaojunz January 30, 2018 19:50
@dguo-coursera dguo-coursera merged commit e29c5c2 into master Jan 30, 2018
Copy link
Contributor

@dguo-coursera dguo-coursera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@yifan-coursera yifan-coursera deleted the yifan/require-binding branch February 1, 2018 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants