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

ClickUtils.copyFormToObject does not work on primitive properties

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      JDK1.5

      Description

      Don't know wheter it is a bug however:

      ClickUtils.copyFormToObject does not work on bean properties which take a primitive type as parameter. Ie setQuantity(int quant); setActive(boolean true);

      The reason is that the various if statements in the paramObject conversation do only check for the Object representation of the primitive types and not for the primitive types as such. ie

      if(paramClass == Integer.class) ...

      should be

      if(paramClass == Integer.class || paramClass == Integer.TYPE) ...

        Activity

        Hide
        medgar Malcolm Edgar added a comment -

        More of an improvement than a bug.

        thanks Malcolm

        Show
        medgar Malcolm Edgar added a comment - More of an improvement than a bug. thanks Malcolm
        Hide
        click_christian Christian Essl added a comment -

        Patch with update of CopyUtils and the TestCase.

        Thanks Malcolm should have found myself how to add a patch.

        Show
        click_christian Christian Essl added a comment - Patch with update of CopyUtils and the TestCase. Thanks Malcolm should have found myself how to add a patch.
        Hide
        medgar Malcolm Edgar added a comment -

        Checked into CVS, will be in 0.18

        Show
        medgar Malcolm Edgar added a comment - Checked into CVS, will be in 0.18

          People

          • Assignee:
            medgar Malcolm Edgar
            Reporter:
            click_christian Christian Essl
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development