Ambiguous method overloading for method ****** 异常的解决办法
程序员文章站
2022-03-08 16:09:39
...
Ambiguous method overloading for method ****** 异常
前言:关于该异常,我是在*上(https://*.com/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 值,就这么简单
上一篇: [异常]Caused by: java.lang.IllegalArgumentException: Result Maps collection already contains value for
推荐阅读
-
Ambiguous method overloading for method java.lang.Long#minus. Cannot resolve which method to invoke
-
java 排序报:Comparison method violates its general contract异常的解决方法
-
java 排序报:Comparison method violates its general contract异常的解决方法
-
Cannot make a static reference to the non-static method报错的解决办法
-
Ambiguous method overloading for method ****** 异常的解决办法
-
异常java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'xxx' method
-
异常java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'xxx' method