question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is the return value of Config#getConfigSources() specified to be immutable and unchanging?

See original GitHub issue

In #370 @struberg notes that “Config infra is basically immutable”. Is there a note somewhere in the specification that indicates that, for example, Config#getConfigSources() must return an unchanging Set of ConfigSources when invoked? Should there be?

Similarly, what is the contract for ConfigSourceProvider#getConfigSources(ClassLoader)? Is it required or prohibited or undefined for a ConfigSourceProvider implementation to return a dynamic Set?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
emattheiscommented, Jan 30, 2020

At the risk of derailing this thread, can someone point me to any background on why config sources are exposed by Config in the first place? The inherently stateful nature of a ConfigSource makes this part of the spec problematic for specifiers and implementors alike. For instance, the fact that someone could obtain the source and close it. Do we need to consider proxying sources to avoid that?

1reaction
Emily-Jiangcommented, Jan 21, 2020

@carlosdlr I’ll take this one and add one line on the javadoc so that it can be in the release of Config 1.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found