Groovy code fail when debugging in IntelliJ IDEA

34 views Asked by At

When I'm trying to run my Groovy code in IntelliJ IDEA it fails on using .size without parenthesis:

response.errors.size == 0

although there is no error in the response ('errors' array is empty).

Assertion failed: 

assert response.errors.size == 0
       |        |      |
       |        null   []
       |
       common.RESTResponse@53abfc07

I have to use .size() then everything is working OK.

response.errors.size() == 0

Groovy Version: 4.0.0 JVM: 17.0.8 Vendor: Oracle Corporation OS: Mac OS X

IntelliJ IDEA 2023.2.2 (Ultimate Edition)

What am I doing wrong?

0

There are 0 answers