Currently when we write something like that:
{code} ConfigurationProperty<Boolean> property = ConfigurationProperty.forKey( "myKey" ) .asBoolean() .withDefault( true ) .build(); Properties properties = new Properties(); properties.putProperty( "somePrefix.myKey", "NOT_A_BOOLEAN" ); ConfigurationPropertySource source = ConfigurationPropertySource.fromProperties( properties ).withMask( " somePrefix" ); {code}
... then the error message caused by the property value not being parseable as a boolean will refer to the property key "myKey" instead of "somePrefix.myKey". That will for sure be confusing for users.
The root of the problem is the way we manage prefixes and masks, hiding it from the client that does the parsing.
We should find some solution that allows us to refer to the actual property key used by the user whenever a parsing error occurs.
* * IMPORTANT* * : the solution should allow to properly display the full name of *any* property, anytime. See for example {{org.hibernate.search.mapper.orm.logging.impl.Log#configurationPropertyTrackingUnusedProperties}} where we need to tell the user to set a property to avoid a warning in the logs. |
|