History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GROOVY-2949
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Paul King
Reporter: Sergey Bondarenko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Bug in ProxyGenerator - "Repetitive method name/signature" error

Created: 11/Jul/08 01:44 AM   Updated: 11/Jul/08 03:07 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Testcase included: yes


 Description  « Hide
The following code produces "Repetitive method name/signature" error.

public abstract class A { abstract protected void doIt() }
class B extends A {
void doIt() {}
}
new ProxyGenerator(debug:true).instantiateDelegateWithBaseClass([:], [], new B())


After removing "protected" modifier it works properly.

Full output:

proxy source:
------------------
import org.codehaus.groovy.runtime.InvokerHelper
class B_delegateProxy extends B {
private delegate
private closureMap
B_delegateProxy(map, delegate) { this.closureMap = map this.delegate = delegate }
void doIt() { Object[] args = [] InvokerHelper.invokeMethod(delegate, 'doIt', args) }
void doIt() { Object[] args = [] InvokerHelper.invokeMethod(delegate, 'doIt', args) } }
}
new B_delegateProxy(map, delegate)
------------------
Exception thrown: groovy.lang.GroovyRuntimeException: Error creating proxy: startup failed, Script1.groovy: 9: Repetitive method name/signature for method 'void doIt()' in class 'B_delegateProxy'.
@ line 9, column 5.Script1.groovy: 13: Repetitive method name/signature for method 'void doIt()' in class 'B_delegateProxy'.
@ line 13, column 5.
2 errors



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.