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

ComponentModel "setObject" methods should take generic "T" type instead of "Object"

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 6.4.0
    • 6.5.0
    • wicket
    • None

    Description

      ComponentModel implements public final void setObject(Object object), although the parameter should be "T object". This expansion of type seems to be useless and it looks like forgotten piece of code from Wicket version which did not support generics.

      The same issue is with protected setObject(Component component, Object object) and the private inner WrapModel.

      Note: This issue also causes an issue with IntelliJ IDEA, which reports a method clash of ComponentModel and IModel because of same erasure (when creating a subclass of ComponentModel). It is possibly IDEA bug, because compilers have no problem with it, but it doesn't change the fact that the setObject signature is at least strange.

      I have tried to find this in JIRA, but unsuccessfully (so please accept my apologies whether I missed it only). The only "info" I have found was this: http://osdir.com/ml/users-wicket.apache.org/2009-05/msg01176.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            otah Ota Hauptmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: