Is the return value of Config#getConfigSources() specified to be immutable and unchanging?
See original GitHub issueIn #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 ConfigSource
s 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:
- Created 5 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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?@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.