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 值,就这么简单