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

BootstrapContext Binder cannot be used if accessed early #24559

Closed
philwebb opened this issue Dec 18, 2020 · 1 comment
Closed

BootstrapContext Binder cannot be used if accessed early #24559

philwebb opened this issue Dec 18, 2020 · 1 comment
Assignees
Milestone

Comments

@philwebb
Copy link
Member

@philwebb philwebb commented Dec 18, 2020

The Binder supplier is added twice in ConfigDataEnvironment.processAndApply, but if the first is accessed then the second registration will fail.

@philwebb philwebb added this to the 2.4.x milestone Dec 18, 2020
@philwebb philwebb self-assigned this Dec 18, 2020
@spencergibb
Copy link
Member

@spencergibb spencergibb commented Dec 18, 2020

It can be used in the lambda in registerIfAbsent(), but if accessed during ConfigDataLocationResolver.isResolvable() you will get the error.

philwebb added a commit that referenced this issue Dec 19, 2020
Update `BootstrapRegistry` so that it can be used to register instances
in either a `singleton` or `prototype` scope. The prototype scope has
been added so that instances can be registered and replaced later
if needed.

See gh-24559
@philwebb philwebb closed this in 5317d8a Dec 19, 2020
@philwebb philwebb modified the milestones: 2.4.x, 2.4.2 Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants