We're updating the issue view to help you get more done. 

Search 6 groundwork - Output the full property key (as provided by the user) in case of parsing error

Description

Currently when we write something like that:

1 2 3 4 5 6 7 8 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" );

... 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.

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major