Errai
  1. Errai
  2. ERRAI-512

DataBinding appears to fail when a generic is involved in method definition

    Details

    • Similar Issues:
      Show 10 results 

      Description

      I have a Bean that has been annotated with @Bindable. It has a method:

      public <Q extends IsQueryParameter> Q registerQueryParameter( String code, Q queryParameter )

      When a binding is attempt, the following error is generated:

      Bound mismatch: The generic method registerQueryParameter(String, Q) of type SearchRequestImpl is not applicable for the arguments (String, Object). The inferred type Object is not a valid substitute for the bounded parameter <Q extends IsQueryParameter>

      Not sure if this is fixable or not. Registering so I remember to ask Christian tomorrow.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Christian Sadilek added a comment -

            This should work now. However, support for generic methods is limited by the functionality provided by errai-codegen.

            Currently type variables using multiple bounds won't work. So, e.g. this will not work:

            <Q extends IsQueryParameter & SomeOtherInterface> Q registerQueryParameter(String code, Q queryParameter)
            

            Show
            Christian Sadilek added a comment - This should work now. However, support for generic methods is limited by the functionality provided by errai-codegen. Currently type variables using multiple bounds won't work. So, e.g. this will not work: <Q extends IsQueryParameter & SomeOtherInterface> Q registerQueryParameter(String code, Q queryParameter)

              People

              • Assignee:
                Unassigned
                Reporter:
                Josh B
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development