第一句子网 - 唯美句子、句子迷、好句子大全
第一句子网 > Ambiguous method overloading for method ****** 异常的解决办法

Ambiguous method overloading for method ****** 异常的解决办法

时间:2022-11-10 23:16:40

相关推荐

Ambiguous method overloading for method ****** 异常的解决办法

Ambiguous method overloading for method ****** 异常

前言:关于该异常,我是在stackoverflow上(/questions/33410033/groovy-ambiguous-method-overload)找到解决方案的,大家也可以去看看专业人士说的,本人小白,说的比较通俗,大佬勿怪

异常如下:

Caused by: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method cn.hutool.core.collection.CollectionUtil#isNotEmpty.Cannot resolve which method to invoke for [null] due to overlapping prototypes between:[interface java.lang.Iterable][interface java.util.Collection][interface java.util.Enumeration][interface java.util.Iterator][interface java.util.Map]

其实就是CollectionUtil.isNotEmpty方法的重载,导致不知道调用哪一个方法了,所以检查一下你传入的参数是否为null 值,就这么简单

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。