Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.4
-
None
-
Patch
Description
When the delegate has inherited protected methods, the code gets generated more than once for them, resulting in a compilation error.
def proxy = ProxyGenerator.instantiateDelegate([], [1, 2, 3]) ==> groovy.lang.GroovyRuntimeException: Error creating proxy: startup failed, Script1.groovy: 109: Repetitive method name/signature for method 'void removeRange(int, int)' in class 'ArrayList_delegateProxy'. @ line 109, column 10.Script1.groovy: 113: Repetitive method name/signature for method 'void removeRange(int, int)' in class 'ArrayList_delegateProxy'. @ line 113, column 10. 2 errors
The trouble is in getInheritedMethods which makes a list of all of the protected methods, but it adds entries for overridden protected methods in the superclasses.