> Given a configuration entry named "foo" with a raw String configuration value of "bar\, baz",
> the value of config.getValue("foo", String.class) must be equal to "bar\, baz", not "bar, baz"
Yes, but config.getValue("foo", String[].class) will result in {"bar, baz"} ;)
> " baz".equals(v[1]); (note the whitespace in the last one).
Well, it's actually not really defined. An impl might decide to trim() those values without violating the spec.
From a user perspective the safest bet is to not include whitespaces I'd say.
> If array conversion fails, it is because of only one of the two following reasons:...
yes
> Whitespace handling in general in the conversion of (or simple retrieval of) raw String configuration values is unspecified,
> so it is legal (but probably quite stupid :-)) for a Converter to consider leading and trailing whitespace around a scalar
> value to be significant (I didn't find "whitespace" in the specification).
Yes it's undefined thus vendor specific. A user should simply not include a whitespace if he wants to be portable.
Happy to improve/clarify whitespace handling!
> As a user, it is not possible to determine through the MicroProfile-Config framework itself all the types a given raw String configuration value may be converted to in a given environment.
Exactly. Do you need that? What is the use case for it?
> One MicroProfile-Config implementation may convert raw String configuration values into a given target type
> using a different Converter from that used by another MicroProfile-Config implementation for the same type conversion.
How so? There must only be one effective Converter for a specific Type. Otherwise this will be treated as deployment error.
But I see that our wording is probably not as specific as I thought ("If multiple Converters are registered for the same type, the one with the highest priority will be used.").
Can you plz create a ticket for it? Txs!
> Is @Priority(0) "higher priority" than @Priority(1), or vice versa?
A very good question indeed. We had the same discussion with @Interceptor and @Alternative sort order.
And btw that's also the reason why I named that property 'ordinal' instead of 'priority' for the ConfigSources back in 2008/9 ;)
In our case a higher value means a higher ordinal.
> Thanks in advance for the overall MicroProfile effort, this group and your time!
Good feedback is always highly appreciated. And you deliver on spot with your questions - so thanks to you as well!
LieGrue,
strub