Skip to content

Multiple issues with ConditionEvaluationResult reason values #4715

Closed
@sbrannen

Description

@sbrannen

Overview

As I mentioned in #4699, there are few long-standing issues with ConditionEvaluationResult.

  1. 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".
  2. We have always allowed null for any of the reasons used to create a ConditionEvaluationResult, but the Javadoc does not reflect that.
  3. 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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions