#284 There is a bug, when implementing interfaces.

open
nobody
None
5
2007-02-09
2007-02-09
Anonymous
No

public class ClassGeneratorUtil implements Constants
{
...
boolean classContainsMethod(
Class clas, String methodName, String [] paramTypes )
{
...
for( int j=0; j<methodParamTypes.length; j++)
{
// The j can greaterthan paramTypes.lenth
if ( ! paramTypes[j].equals( methodParamTypes[j] ) ) {
found = false;
break;
}
}
...
}
...
}

yuu can check then parameters count first. if parameters count is not equal, no need to compare others.

Discussion