byteman

byteman rule: return 10.001, got invalid expression error


Byteman version: 4.0.21

RULE test rule
CLASS Test
METHOD getDouble
AT EXIT
IF true
DO
return 10.001
ENDRULE

java logs:

TransformListener() : handling connection on port 9091
retransforming Test
org.jboss.byteman.agent.Transformer : error parsing rule test rule
org.jboss.byteman.rule.exception.ParseException: rule test rule
return_double.rule line 7 : invalid expression
org.jboss.byteman.rule.exception.ParseException: rule test rule
return_double.rule line 7 : invalid expression
at org.jboss.byteman.rule.Rule.\<init\>(Rule.java:240)

this works, the only different is return 10.1 and return 10.001.

RULE test rule
CLASS Test
METHOD getDouble
AT EXIT
IF true
DO
return 10.1
ENDRULE

Solution

  • Thanks for reporting this. The fix will be incorporated into the next Byteman release.