Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.18.0
-
Fix Version/s: 2.19.0
-
Component/s: camel-core
-
Labels:None
-
Environment:
Ubuntu 14.04
-
Estimated Complexity: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
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