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
Labels
type: bug A general bug
Milestone

Comments

@philwebb
Copy link
Member

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
@philwebb philwebb added the type: bug A general bug label Dec 18, 2020
@spencergibb
Copy link
Member

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 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
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants