Tapestry
  1. Tapestry
  2. TAPESTRY-1702

Missing coercion from primitive arrays to List

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.6
    • Component/s: tapestry-ioc
    • Labels:
      None

      Description

      int[] does not get not coerced into List of Integers.

      int[] value gets recognized as an object, not an Object[] which is true for all primitive type arrays.

      even if it goes to Object[] -> List coercer the code there: Arrays.asList will create an
      list containing the array, instead containing the values from the array.

      I've noticed this issue when supplying int[] to loop component ....

        Activity

        Hide
        Davor Hrg added a comment -

        patch

        test that causes failure ,
        proposed fix

        Show
        Davor Hrg added a comment - patch test that causes failure , proposed fix
        Hide
        Daniel Gredler added a comment -

        This is actually not just about int[], but about all primitive arrays. I've updated the summary accordingly.

        Show
        Daniel Gredler added a comment - This is actually not just about int[], but about all primitive arrays. I've updated the summary accordingly.
        Hide
        Daniel Gredler added a comment -

        Fixed in SVN, thanks for the patch. The final solution was a little bit different, in that I added new coercions for each of the specific primitive array types, rather than bolting the funtionality onto the Object -> List coercion. Take a look in SVN if you're interested in the details.

        Show
        Daniel Gredler added a comment - Fixed in SVN, thanks for the patch. The final solution was a little bit different, in that I added new coercions for each of the specific primitive array types, rather than bolting the funtionality onto the Object -> List coercion. Take a look in SVN if you're interested in the details.

          People

          • Assignee:
            Daniel Gredler
            Reporter:
            Davor Hrg
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development