--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/7591fcc6-9064-41c6-b59f-1e788e0a3003%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In order not to cause any undesirable behaviour/exceptions, the map should be immutable. In the class-level javadoc, we have
A ConfigSource is always read-only, any potential updates of the configured values must be handled directly inside each ConfigSource.
Is this clear enough?
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/tvjgSR9qL2Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile+unsubscribe@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/20edb710-b580-482d-b7fa-808fa29b08ea%40googlegroups.com.
It is nature to have a map to hold all properties for each config sources.
The default impl of getConfigNames directly collects the keys of the map. Without this, the config source needs to figure out the keys.
One thing I want to bring it up is that the method getProperties may not contain the fullset of the config properties as the backend config source might be too big e.g. zookeeper. We have an open issue to document it better, see issue https://github.com/eclipse/microprofile-config/issues/333. Please add your comments and thoughts there.
Hi,Assuming you're going to create a similar method in the Config JSR API, could you consider to return a dedicated type that only exposes the read methods, e.g. ConfigValueMap?
It'd be nice if Java had read-only collection interfaces, but until that's the case I think it's a good idea to return dedicated types exposing just the right API to avoid this kind of issue.