Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
ComparisonExpression handles a Boolean left operand and String right operand by casting the Boolean left value to String. With string-expression conversion enabled by the selector parser, this branch always throws ClassCastException.
Steps to Reproduce
- Parse a selector expression such as TRUE=a.
- Evaluate it with string property a=true.
- Observe the Boolean-to-String cast failure.
What Did You Expect to See?
The string right operand should be converted to Boolean and compared normally.
What Did You See Instead?
The Boolean left operand is cast to String and evaluation throws ClassCastException.
Additional Context
The reverse String-to-Boolean branch already converts the string operand correctly.
Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
ComparisonExpression handles a Boolean left operand and String right operand by casting the Boolean left value to String. With string-expression conversion enabled by the selector parser, this branch always throws ClassCastException.
Steps to Reproduce
What Did You Expect to See?
The string right operand should be converted to Boolean and compared normally.
What Did You See Instead?
The Boolean left operand is cast to String and evaluation throws ClassCastException.
Additional Context
The reverse String-to-Boolean branch already converts the string operand correctly.