Click
  1. Click
  2. CLK-53

ClickUtils.copyFormToObject does not work on primitive properties

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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
        Malcolm Edgar added a comment -

        More of an improvement than a bug.

        thanks Malcolm

        Show
        Malcolm Edgar added a comment - More of an improvement than a bug. thanks Malcolm
        Hide
        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
        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
        Malcolm Edgar added a comment -

        Checked into CVS, will be in 0.18

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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development