Uploaded image for project: 'Click'
  1. Click
  2. CLK-461

ContainerUtils#copyContainerToObject picks wrong getter method from domain object

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5 RC3
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      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)

        Attachments

          Activity

            People

            • Assignee:
              sabob Bob Schellink
              Reporter:
              sabob Bob Schellink
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: