Hiya Bill.

The issue is that the findMethodByHash method assumes that the clazz argument is a 
class, in this case it is an interface.  The bug is that the method being searched is 
in a super interface of the one being called, hence it is never found.

I have a simple test case that reproduces it and a patch that is very similar to the 
one Marcio suggested.


  |    public static Method findMethodByHash(Class clazz, long hash) throws Exception
  |    {
  |       Method[] methods = clazz.getDeclaredMethods();
  |       for (int i = 0; i < methods.length; i++)
  |       {
  |          if (methodHash(methods) == hash) return methods;
  |       }
  |       if (clazz.isInterface())
  |       {
  |          final Class[] interfaces = clazz.getInterfaces() ;
  |          final int numInterfaces = interfaces.length ;
  |          for(int count = 0 ; count < numInterfaces ; count++)
  |          {
  |             final Method method = findMethodByHash(interfaces[count], hash) ;
  |             if (method != null)
  |             {
  |                return method ;
  |             }
  |          }
  |       }
  |       else if (clazz.getSuperclass() != null)
  |       {
  |          return findMethodByHash(clazz.getSuperclass(), hash);
  |       }
  |       return null;
  |    }
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849297#3849297

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849297


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to