Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new
DataType.BINARY
to allow generic objects to be evaluated by special functions.A new dedicated Converter --
BinaryConverter
-- was created and added to the last position in the chain of converters inDefaultEvaluationValueConverter
, allowing to convert any object that wasn't converted before, as per Discussion #481 (Working with XML Documents).The existing behavior for objects that any converter could not convert was to throw an exception. I decided to preserve this behavior and let the new
BinaryConverter
be configurable in theExpressionConfiguration
so that the exception will not be thrown when the binary data type is enabled. I decided to let the initial state "false" for compatibility.The
BinaryConverter
then reads the current configuration to determine whether or not to "convert" the object. To make that possible, I added theExpressionconfiguration
as a new parameter toConverterIfc.canConvert(...)
.I finally added some JUnits for full coverage according to the repository rules.
Documentation files were also updated accordingly.