## Details

## Description

Hi, I have the same issue as in ~~GROOVY-4587~~.

For the inputs

[0.0], [], [], [543]

the function-code below does throw an Exception which can be fixed by changing

```
if (ReWK < 0) {
```

to

if (((int)ReWK) < 0) {

Seems like a bug to me or am I doing it wrong? Various other inputs run fine.

Gesamtbetrag,Direktabzug,Prozent,Einzelbetrag-> def int ReWK = 0 def arrAbzWK = []; Gesamtbetrag.eachWithIndex { it, index -> if(Gesamtbetrag[index] > 0){ if(Prozent[index] != 0 && Prozent[index] != null) { ReWK = Math.ceil( Gesamtbetrag[index] * (100 - Prozent[index]) / 100 ) } else if (Direktabzug[index] > 0 ) { ReWK = Math.ceil( Gesamtbetrag[index] - Direktabzug[index] ) if (ReWK < 0) { ReWK = 0 } } else if (Einzelbetrag[index] > 0) { ReWK = Math.ceil( Einzelbetrag[index] ) } else { ReWK = 0 } } arrAbzWK.add(ReWK) } return arrAbzWK

works now