提问人:fred 提问时间:10/30/2023 更新时间:10/30/2023 访问量:26
在 IntelliJ IDEA 中调试时,Groovy 代码失败
Groovy code fail when debugging in IntelliJ IDEA
问:
当我尝试在 IntelliJ IDEA 中运行我的 Groovy 代码时,它在使用不带括号的 .size 时失败:
response.errors.size == 0
尽管响应中没有错误(“errors”数组为空)。
Assertion failed:
assert response.errors.size == 0
| | |
| null []
|
common.RESTResponse@53abfc07
我必须使用 .size() 然后一切正常。
response.errors.size() == 0
Groovy 版本:4.0.0 JVM:17.0.8 供应商:Oracle Corporation 操作系统:Mac OS X操作系统
IntelliJ IDEA 2023.2.2(旗舰版)
我做错了什么?
答: 暂无答案
评论
errors
errors
response.errors
errors
size()
assert !response.errors