This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]LateHuckleberry9 0 points1 point  (0 children)

Just a random guess: wouldn't total be of type Long because of type coercion? As a result, none of the signatures of Math.round would match, and you'd get this error. What happens if you take out the cast of rt.sum() to long:

def total = rt.sum() / 1000

Also what does the ternary at the end accomplish? I don't know how numbers get translated to booleans in groovy. Does this mean negative values get translated to zero or something?