7 Replies Latest reply on Oct 29, 2011 3:52 PM by navigateur

    Cannot use generics in Errai RPC




      Errai cannot handle generic methods. If I declare a remote service as:


      <A extends Action<R>, R extends ActionResult> R execute(A action)


      The RPCStub generated by Errai is:


      public ActionResult execute(Action _0)


      Then the GWT compiler fails with:


      [ERROR] Errors in 'generated://786F5E4D45EAB85B5D2D81DBDE4686F4/org/jboss/errai/bus/client/ext/ExtensionsLoaderImpl.java'

         [ERROR] Line 56:  The type DispatchServiceImpl must implement the inherited abstract method DispatchService.execute(A)

         [ERROR] Line 80:  Name clash: The method execute(Action) of type DispatchServiceImpl has the same erasure as execute(A) of type DispatchService but does not override it


      I believe that there is no solution to that, but maybe my knowledge of generics is not so good.

      Does anyone know if it is possible to solve this problem?