Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.18.0
-
None
-
Ubuntu 14.04
-
Unknown
Description
I've noticed that the overload selection mechanism based on parameter types is not working when some parameters are assignable, in the sense of Class.isAssignableFrom(...).
Given those methods:
String toString(String input) String toString(int input)
We can select both methods via bean:toString(String) or bean:toString(int)
But given those methods:
String toString(String input) String toString(Object input)
bean:toString(String) end in selecting toString(Object).
Ideally, I would expect it to select toString(String). Otherwise, unwinding an AmbiguousCallException may perhaps apply.
Thoughts:
I'm wondering whether ObjectHelper.isOverridingMethod(...) would be mixing overload vs override.
Will attach a test case.
Attachments
Attachments
Issue Links
- breaks
-
CAMEL-11235 Simple Language: AmbiguousMethodCallException when calling method implemented by super class when method is defined by interface and abstract class
- Resolved
-
CAMEL-11240 Simple Language: MethodNotFoundException when calling interface method implemented by super class
- Resolved
- links to