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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        49d 8h 27m 1 Daniel Gredler 29/Sep/07 06:39
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568251 ] jira [ 12591323 ]
        Mark Thomas made changes -
        Workflow jira [ 12410428 ] Default workflow, editable Closed status [ 12568251 ]
        Daniel Gredler made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 5.0.6 [ 12312544 ]
        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.
        Daniel Gredler made changes -
        Summary int[] not coerced into List<Integer> Missing coercion from primitive arrays to List
        Assignee Daniel Gredler [ sdanig ]
        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.
        Davor Hrg made changes -
        Field Original Value New Value
        Attachment TAPESTRY-1702.patch [ 12363620 ]
        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
        Davor Hrg created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development