Overview
As I mentioned in #4699, there are few long-standing issues with ConditionEvaluationResult.
- When a custom reason is supplied but a
null value is supplied for the default reason to ConditionEvaluationResult.disabled(String, String), the generated reason is "null ==> custom"; whereas, ideally that should just be "custom".
- We have always allowed
null for any of the reasons used to create a ConditionEvaluationResult, but the Javadoc does not reflect that.
- We should not use a blank reason as-is (such as an empty string or a string containing only whitespace). Instead, we should treat a blank reason the same as we do for a
null reason.
Point 1 is a bug. Point 2 is a documentation issue. Point 3 is rather an enhancement. However, since these are all closely related, I have created this single GitHub issue to address all three together.
Related Issues
Overview
As I mentioned in #4699, there are few long-standing issues with
ConditionEvaluationResult.nullvalue is supplied for the default reason toConditionEvaluationResult.disabled(String, String), the generated reason is"null ==> custom"; whereas, ideally that should just be"custom".nullfor any of the reasons used to create aConditionEvaluationResult, but the Javadoc does not reflect that.nullreason.Point 1 is a bug. Point 2 is a documentation issue. Point 3 is rather an enhancement. However, since these are all closely related, I have created this single GitHub issue to address all three together.
Related Issues
ConditionEvaluationResultAPIs should accept@Nullablereasons #4698@Nullablereasons inConditionEvaluationResultAPIs #4699