You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd guess this is related to #1553
The java compiler probably generates a method to access that other foo of the super class, and thus, there are two methods with the same name. Personally, I'd refrain to use getMethodByNameUnsafe if possible for reasons like this. Besides, overloading methods is very common and would lead to a failure as well. I'd reference methods by their subsignature.
Suppose I have a class A and a class B that extends A. Class B has a method
foo
that overrides Class A'sfoo
.When I use the following code to get class B's
foo
, an exception is thrown sayingsoot.AmbiguousMethodException: Ambiguous method name foo in class B
When I print all the methods in B, the output is
Since B's
foo
overrides A'sfoo
, why there are twofoo
s in B that causes the ambiguous exception?The text was updated successfully, but these errors were encountered: