Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5931

Improve generics for ListView: don't use wildcard for T

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.0.0-M5, 7.0.0-M6
    • 7.0.0
    • wicket
    • None

    Description

      The generics for ListView<T> are that the model of each list item is not typed as T but rather ? extends T. This makes the model for the ListView read only, and you can't do anything with the list you get from the ListView.

      For a ListView you care about the T so this should be pure, but you only care about that the model for the ListView is some sort of List, so ? extends List<T> is OK to use.

      Attachments

        Issue Links

          Activity

            People

              dashorst Martijn Dashorst
              dashorst Martijn Dashorst
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: