[
https://issues.apache.org/activemq/browse/CAMEL-983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46421#action_46421
]
Claus Ibsen commented on CAMEL-983:
-----------------------------------
Should be:
private boolean overrideExistingMethod(MethodInfo methodInfo) {
+ for (MethodInfo info : operationsWithBody) {
+
+ // name test
+ if
(!info.getMethod().getName().equals(methodInfo.getMethod().getName())) {
+ continue;
+ }
+
+ // parameter types
+ if (info.getMethod().getParameterTypes().length !=
methodInfo.getMethod().getParameterTypes().length) {
+ continue;
+ }
+
+ for (int i = 0; i < info.getMethod().getParameterTypes().length;
i++) {
+ Class type1 = info.getMethod().getParameterTypes()[i];
+ Class type2 = methodInfo.getMethod().getParameterTypes()[i];
+ if (!type1.equals(type2)) {
+ continue;
+ }
+ }
+
+ // sanme name, same parameters, then its overrides an existing
class
+ return true;
+ }
+
+ return false;
+ }
> BeanInfo - should consider overridden methods when selecting method from
> operations list
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-983
> URL: https://issues.apache.org/activemq/browse/CAMEL-983
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 1.4.0
> Reporter: Claus Ibsen
> Attachments: CAMEL-983.patch
>
>
> See nabble:
> http://www.nabble.com/BeanInfo.chooseMethodWithMatchingBody-throws-an-AmbiguousMethodCallException-when-there%27s-no-ambiguity-td19959124s22882.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.