Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5 RC3
-
None
-
None
Description
If a domain object contains two overloaded getter methods (both methods have the same name but different arguments), ContainerUtils#copyContainerToObject can pick the wrong getter method which leads to the following exception:
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at net.sf.click.util.ContainerUtils.ensureObjectPathNotNull(ContainerUtils.java:592)
at net.sf.click.util.ContainerUtils.copyContainerToObject(ContainerUtils.java:318)
at net.sf.click.util.ContainerUtils.copyContainerToObject(ContainerUtils.java:355)
at net.sf.click.control.Form.copyTo(Form.java:1710)