Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5
-
None
-
Windows XP SP2
Description
static method in sub category class could not override that in super category class.
More information to recreate the problem
****************************************************
TestBaseCategory .java
****************************************************
package zero.assemble.flow.util;
public class TestBaseCategory {
public static void test(Object str)
{ System.out.println("test() in TestBaseCategory"); }}
****************************************************
TestCategory.java
****************************************************
package zero.assemble.flow.util;
public class TestCategory extends TestBaseCategory{
public static void test(Object str)
}
****************************************************
test.groovy
****************************************************
use (zero.assemble.flow.util.TestCategory) {
"abc".test()
}
In the system console, it should show the "test() in TestCategory", but it show
"test() in TestBaseCategory",
When our debug the code, we found the
org.codehaus.groovy.runtime.metaclass.NewMetaMethod#getDeclaringClass() could
not return correct class.